diff options
Diffstat (limited to 'plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test')
2 files changed, 23 insertions, 16 deletions
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java index 8f0e0940b..8ef0ec95c 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java @@ -5,15 +5,15 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ @@ -166,7 +166,7 @@ public class ApexRestClientProducerTest { arcp.setClient(httpClientMock); try { - arcp.sendEvent(123, "EventName", "This is an Event"); + arcp.sendEvent(123, null, "EventName", "This is an Event"); arcp.stop(); } catch (Exception ex) { fail("test should not throw an exception"); @@ -203,7 +203,7 @@ public class ApexRestClientProducerTest { arcp.setClient(httpClientMock); try { - arcp.sendEvent(123, "EventName", "This is an Event"); + arcp.sendEvent(123, null, "EventName", "This is an Event"); arcp.stop(); } catch (Exception e) { fail("test should not throw an exception"); @@ -246,7 +246,7 @@ public class ApexRestClientProducerTest { arcp.setClient(httpClientMock); try { - arcp.sendEvent(123, "EventName", "This is an Event"); + arcp.sendEvent(123, null, "EventName", "This is an Event"); arcp.stop(); } catch (Exception e) { fail("test should not throw an exception"); @@ -292,7 +292,7 @@ public class ApexRestClientProducerTest { arcp.setClient(httpClientMock); try { - arcp.sendEvent(123, "EventName", "This is an Event"); + arcp.sendEvent(123, null, "EventName", "This is an Event"); arcp.stop(); } catch (Exception e) { fail("test should not throw an exception"); @@ -329,7 +329,7 @@ public class ApexRestClientProducerTest { arcp.setClient(httpClientMock); try { - arcp.sendEvent(123, "EventName", "This is an Event"); + arcp.sendEvent(123, null, "EventName", "This is an Event"); fail("test should throw an exception here"); } catch (Exception e) { assertEquals( diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/SupportApexEventReceiver.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/SupportApexEventReceiver.java index d3f8b9e82..5459310fa 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/SupportApexEventReceiver.java +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/SupportApexEventReceiver.java @@ -5,21 +5,23 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ package org.onap.policy.apex.plugins.event.carrier.restclient; +import java.util.Properties; + import org.onap.policy.apex.service.engine.event.ApexEventException; import org.onap.policy.apex.service.engine.event.ApexEventReceiver; @@ -32,21 +34,26 @@ public class SupportApexEventReceiver implements ApexEventReceiver { private Object lastEvent; private int eventCount; - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.onap.policy.apex.service.engine.event.ApexEventReceiver#receiveEvent(long, java.lang.Object) */ @Override - public void receiveEvent(long executionId, Object event) throws ApexEventException { + public void receiveEvent(final long executionId, final Properties executionProperties, final Object event) + throws ApexEventException { this.lastExecutionId = executionId; this.lastEvent = event; this.eventCount++; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see org.onap.policy.apex.service.engine.event.ApexEventReceiver#receiveEvent(java.lang.Object) */ @Override - public void receiveEvent(Object event) throws ApexEventException { + public void receiveEvent(final Properties executionProperties, final Object event) throws ApexEventException { this.lastEvent = event; this.eventCount++; } @@ -61,7 +68,7 @@ public class SupportApexEventReceiver implements ApexEventReceiver { /** * Get the number of events received. - * + * * @return the number of events received */ public int getEventCount() { |