summaryrefslogtreecommitdiffstats
path: root/examples/examples-adaptive/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'examples/examples-adaptive/src/test')
-rw-r--r--examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AnomalyDetectionConceptTest.java23
-rw-r--r--examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AnomalyDetectionTslUseCaseTest.java1
-rw-r--r--examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AutoLearnTslUseCaseTest.java1
-rw-r--r--examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/TestApexActionListener.java1
4 files changed, 13 insertions, 13 deletions
diff --git a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AnomalyDetectionConceptTest.java b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AnomalyDetectionConceptTest.java
index 623588267..f1c8d7dca 100644
--- a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AnomalyDetectionConceptTest.java
+++ b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AnomalyDetectionConceptTest.java
@@ -20,18 +20,20 @@
package org.onap.policy.apex.examples.adaptive;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertTrue;
import java.util.LinkedList;
import java.util.List;
-
import org.junit.Test;
import org.onap.policy.apex.examples.adaptive.concepts.AnomalyDetection;
public class AnomalyDetectionConceptTest {
@Test
- public void testToString(){
+ public void testToString() {
AnomalyDetection anomalyDetection = new AnomalyDetection();
List<Double> newAnomalyScores = new LinkedList<>();
newAnomalyScores.add((double) 55);
@@ -39,13 +41,14 @@ public class AnomalyDetectionConceptTest {
anomalyDetection.setFrequency(55);
assertEquals(newAnomalyScores, anomalyDetection.getAnomalyScores());
assertTrue(anomalyDetection.checkSetAnomalyScores());
- assertEquals(55,anomalyDetection.getFrequency());
- assertEquals(true,anomalyDetection.getFirstRound());
- assertEquals("AnomalyDetection [firstRound=true, frequency=55, anomalyScores=[55.0], frequencyForecasted=null]", anomalyDetection.toString());
+ assertEquals(55, anomalyDetection.getFrequency());
+ assertEquals(true, anomalyDetection.getFirstRound());
+ assertEquals("AnomalyDetection [firstRound=true, frequency=55, anomalyScores=[55.0], frequencyForecasted=null]",
+ anomalyDetection.toString());
}
@Test
- public void testHashCode(){
+ public void testHashCode() {
AnomalyDetection detection = new AnomalyDetection();
AnomalyDetection compareDetection = new AnomalyDetection();
assertEquals(detection.hashCode(), compareDetection.hashCode());
@@ -99,13 +102,13 @@ public class AnomalyDetectionConceptTest {
}
@Test
- public void testCheckSets(){
+ public void testCheckSets() {
AnomalyDetection anomalyDetection = new AnomalyDetection();
assertFalse(anomalyDetection.checkSetAnomalyScores());
List<Double> anomalyScores = new LinkedList<>();
anomalyDetection.setAnomalyScores(anomalyScores);
assertFalse(anomalyDetection.checkSetAnomalyScores());
- anomalyScores.add((double)2);
+ anomalyScores.add((double) 2);
anomalyDetection.setAnomalyScores(anomalyScores);
assertTrue(anomalyDetection.checkSetAnomalyScores());
anomalyDetection.unsetAnomalyScores();
@@ -115,7 +118,7 @@ public class AnomalyDetectionConceptTest {
List<Double> frequencyForecasted = new LinkedList<>();
anomalyDetection.setFrequencyForecasted(frequencyForecasted);
assertFalse(anomalyDetection.checkSetFrequencyForecasted());
- frequencyForecasted.add((double)2);
+ frequencyForecasted.add((double) 2);
anomalyDetection.setFrequencyForecasted(frequencyForecasted);
assertTrue(anomalyDetection.checkSetFrequencyForecasted());
anomalyDetection.unsetFrequencyForecasted();
diff --git a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AnomalyDetectionTslUseCaseTest.java b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AnomalyDetectionTslUseCaseTest.java
index d1b2aaae7..5beab7724 100644
--- a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AnomalyDetectionTslUseCaseTest.java
+++ b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AnomalyDetectionTslUseCaseTest.java
@@ -29,7 +29,6 @@ import static org.junit.Assert.assertTrue;
import java.io.IOException;
import java.util.Random;
import java.util.concurrent.TimeUnit;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AutoLearnTslUseCaseTest.java b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AutoLearnTslUseCaseTest.java
index ab0bf303f..52d1b7ff8 100644
--- a/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AutoLearnTslUseCaseTest.java
+++ b/examples/examples-adaptive/src/test/java/org/onap/policy/apex/examples/adaptive/AutoLearnTslUseCaseTest.java
@@ -29,7 +29,6 @@ import static org.junit.Assert.assertTrue;
import java.io.IOException;
import java.util.Random;
import java.util.concurrent.TimeUnit;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
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 b06908da2..702b050fd 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
@@ -26,7 +26,6 @@ import static org.awaitility.Awaitility.await;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
-
import org.onap.policy.apex.core.engine.engine.EnEventListener;
import org.onap.policy.apex.core.engine.event.EnEvent;