aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestApexActionListener.java13
-rw-r--r--examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestApexActionListener.java25
-rw-r--r--examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestSaleAuthListener.java23
3 files changed, 14 insertions, 47 deletions
diff --git a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestApexActionListener.java b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestApexActionListener.java
index 37a916a1e..825ce5866 100644
--- a/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestApexActionListener.java
+++ b/examples/examples-aadm/src/test/java/org/onap/policy/apex/examples/aadm/TestApexActionListener.java
@@ -24,6 +24,7 @@ package org.onap.policy.apex.examples.aadm;
import java.util.ArrayList;
import java.util.List;
+import lombok.AllArgsConstructor;
import lombok.Getter;
import org.onap.policy.apex.core.engine.engine.EnEventListener;
import org.onap.policy.apex.core.engine.event.EnEvent;
@@ -36,22 +37,14 @@ import org.onap.policy.apex.core.engine.event.EnEvent;
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
+@AllArgsConstructor
public class TestApexActionListener implements EnEventListener {
- List<EnEvent> resultEvents = new ArrayList<EnEvent>();
+ private final List<EnEvent> resultEvents = new ArrayList<EnEvent>();
@Getter
private final String id;
/**
- * Instantiates a new test apex action listener.
- *
- * @param id the id
- */
- public TestApexActionListener(final String id) {
- this.id = id;
- }
-
- /**
* Gets the result.
*
* @return the result
diff --git a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestApexActionListener.java b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestApexActionListener.java
index 702b050fd..273d8b77d 100644
--- a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestApexActionListener.java
+++ b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestApexActionListener.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,6 +27,8 @@ import static org.awaitility.Awaitility.await;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.onap.policy.apex.core.engine.engine.EnEventListener;
import org.onap.policy.apex.core.engine.event.EnEvent;
@@ -37,21 +40,14 @@ import org.onap.policy.apex.core.engine.event.EnEvent;
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
+@AllArgsConstructor
public class TestApexActionListener implements EnEventListener {
- private List<EnEvent> resultEvents = new ArrayList<>();
+ private final List<EnEvent> resultEvents = new ArrayList<>();
+ @Getter
private final String id;
/**
- * Instantiates a new test apex action listener.
- *
- * @param id the id
- */
- public TestApexActionListener(final String id) {
- this.id = id;
- }
-
- /**
* Gets the result.
*
* @return the result
@@ -71,13 +67,4 @@ public class TestApexActionListener implements EnEventListener {
resultEvents.add(actionEvent);
}
}
-
- /**
- * Gets the id.
- *
- * @return the id
- */
- public String getId() {
- return id;
- }
}
diff --git a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestSaleAuthListener.java b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestSaleAuthListener.java
index 1281c515d..01c24d6de 100644
--- a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestSaleAuthListener.java
+++ b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestSaleAuthListener.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
* Modifications Copyright (C) 2020 Nordix Foundation.
+ * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,6 +27,8 @@ import static org.awaitility.Awaitility.await;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
import org.onap.policy.apex.core.engine.engine.EnEventListener;
import org.onap.policy.apex.core.engine.event.EnEvent;
@@ -37,23 +40,16 @@ import org.onap.policy.apex.core.engine.event.EnEvent;
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
+@AllArgsConstructor
public class TestSaleAuthListener implements EnEventListener {
// CHECKSTYLE:OFF: MagicNumber
private final List<EnEvent> resultEvents = new ArrayList<>();
+ @Getter
private final String id;
/**
- * Instantiates a new action listener.
- *
- * @param id the id
- */
- public TestSaleAuthListener(final String id) {
- this.id = id;
- }
-
- /**
* Gets the result.
*
* @return the result
@@ -73,13 +69,4 @@ public class TestSaleAuthListener implements EnEventListener {
resultEvents.add(saleauthEvent);
}
}
-
- /**
- * Gets the id.
- *
- * @return the id
- */
- public String getId() {
- return id;
- }
}