summaryrefslogtreecommitdiffstats
path: root/controlloop/common/policy-yaml/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/policy-yaml/src/test')
-rw-r--r--controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java10
-rw-r--r--controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuardBuilderTest.java6
-rw-r--r--controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuardTest.java10
3 files changed, 16 insertions, 10 deletions
diff --git a/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java b/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java
index b0d15463d..b847009cc 100644
--- a/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java
+++ b/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java
@@ -29,6 +29,8 @@ import java.io.IOException;
import java.io.InputStream;
import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.DumperOptions.FlowStyle;
import org.yaml.snakeyaml.Yaml;
@@ -36,7 +38,7 @@ import org.yaml.snakeyaml.constructor.Constructor;
public class ControlLoopPolicyTest {
-
+ private static final Logger logger = LoggerFactory.getLogger(ControlLoopPolicyTest.class);
@Test
public void test() {
this.test("src/test/resources/v1.0.0/policy_Test.yaml");
@@ -91,7 +93,7 @@ public class ControlLoopPolicyTest {
options.setPrettyFlow(true);
yaml = new Yaml(options);
String dumpedYaml = yaml.dump(obj);
- System.out.println(dumpedYaml);
+ logger.debug(dumpedYaml);
//
// Read that string back into our java object
//
@@ -112,7 +114,7 @@ public class ControlLoopPolicyTest {
}
public void dump(Object obj) {
- System.out.println("Dumping " + obj.getClass().getCanonicalName());
- System.out.println(obj.toString());
+ logger.debug("Dumping ", obj.getClass().getCanonicalName());
+ logger.debug("{}", obj);
}
}
diff --git a/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuardBuilderTest.java b/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuardBuilderTest.java
index da81db394..36cf34e5f 100644
--- a/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuardBuilderTest.java
+++ b/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuardBuilderTest.java
@@ -40,11 +40,13 @@ import org.onap.policy.controlloop.policy.builder.Message;
import org.onap.policy.controlloop.policy.builder.MessageLevel;
import org.onap.policy.controlloop.policy.builder.Results;
import org.onap.policy.controlloop.policy.guard.builder.ControlLoopGuardBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.Constructor;
public class ControlLoopGuardBuilderTest {
-
+ private static final Logger logger = LoggerFactory.getLogger(ControlLoopGuardBuilderTest.class);
@Test
public void testControlLoopGuard() {
try {
@@ -190,7 +192,7 @@ public class ControlLoopGuardBuilderTest {
//
// Print out the specification
//
- System.out.println(results.getSpecification());
+ logger.debug(results.getSpecification());
//
} catch (FileNotFoundException e) {
fail(e.getLocalizedMessage());
diff --git a/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuardTest.java b/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuardTest.java
index 61ad4dfbf..d1a35413e 100644
--- a/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuardTest.java
+++ b/controlloop/common/policy-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuardTest.java
@@ -29,6 +29,8 @@ import java.io.IOException;
import java.io.InputStream;
import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.DumperOptions.FlowStyle;
import org.yaml.snakeyaml.Yaml;
@@ -36,7 +38,7 @@ import org.yaml.snakeyaml.constructor.Constructor;
public class ControlLoopGuardTest {
-
+ private static final Logger logger = LoggerFactory.getLogger(ControlLoopGuardTest.class);
@Test
public void testGuardvDNS() {
this.test("src/test/resources/v2.0.0-guard/policy_guard_ONAP_demo_vDNS.yaml");
@@ -66,7 +68,7 @@ public class ControlLoopGuardTest {
options.setPrettyFlow(true);
yaml = new Yaml(options);
String dumpedYaml = yaml.dump(obj);
- System.out.println(dumpedYaml);
+ logger.debug(dumpedYaml);
//
// Read that string back into our java object
//
@@ -87,7 +89,7 @@ public class ControlLoopGuardTest {
}
public void dump(Object obj) {
- System.out.println("Dumping " + obj.getClass().getCanonicalName());
- System.out.println(obj.toString());
+ logger.debug("Dumping {}", obj.getClass().getCanonicalName());
+ logger.debug("{}", obj);
}
}