summaryrefslogtreecommitdiffstats
path: root/PolicyEngineUtils
diff options
context:
space:
mode:
authorParshad Patel <pars.patel@samsung.com>2018-12-27 19:52:56 +0900
committerParshad Patel <pars.patel@samsung.com>2018-12-27 19:53:12 +0900
commit31e122b8c77b933db7475b2889efcfba83e378b5 (patch)
tree2f51671d03b3f677bdeb758d44333173b6e9434d /PolicyEngineUtils
parentffdaf107b89321de081a4f122cf83393c196d769 (diff)
Rename test classes in policy/engine
Make test classes name consitence by adding 'Test' at end of junit test classes and adding 'Support' or 'Dummy' at start of util or dummy type of test classes Issue-ID: POLICY-1281 Change-Id: I5fa65d0cfc95edc8f2fe0ca678a43d2011a39670 Signed-off-by: Parshad Patel <pars.patel@samsung.com>
Diffstat (limited to 'PolicyEngineUtils')
-rw-r--r--PolicyEngineUtils/src/test/java/org/onap/policy/utils/test/BackUpMonitorTest.java (renamed from PolicyEngineUtils/src/test/java/org/onap/policy/utils/test/testBackUpMonitor.java)20
-rw-r--r--PolicyEngineUtils/src/test/java/org/onap/policy/utils/test/DummyBackUpHandler.java (renamed from PolicyEngineUtils/src/test/java/org/onap/policy/utils/test/Handler.java)2
2 files changed, 11 insertions, 11 deletions
diff --git a/PolicyEngineUtils/src/test/java/org/onap/policy/utils/test/testBackUpMonitor.java b/PolicyEngineUtils/src/test/java/org/onap/policy/utils/test/BackUpMonitorTest.java
index 39434a7e7..83362fd0d 100644
--- a/PolicyEngineUtils/src/test/java/org/onap/policy/utils/test/testBackUpMonitor.java
+++ b/PolicyEngineUtils/src/test/java/org/onap/policy/utils/test/BackUpMonitorTest.java
@@ -56,7 +56,7 @@ import org.onap.policy.utils.PolicyUtils;
import com.fasterxml.jackson.core.JsonProcessingException;
-public class testBackUpMonitor {
+public class BackUpMonitorTest {
@Test (expected = PersistenceException.class)
public void backUpMonitorTestFail() throws Exception{
@@ -65,7 +65,7 @@ public class testBackUpMonitor {
properties.setProperty("javax.persistence.jdbc.url", "jdbc:mariadb://localhost:3306/onap_sdk");
properties.setProperty("javax.persistence.jdbc.user", "policy_user");
properties.setProperty("javax.persistence.jdbc.password", "");
- BackUpMonitor.getInstance(BackUpMonitor.ResourceNode.BRMS.toString(), "brms_test" , properties, new Handler());
+ BackUpMonitor.getInstance(BackUpMonitor.ResourceNode.BRMS.toString(), "brms_test" , properties, new DummyBackUpHandler());
}
@Test
@@ -75,7 +75,7 @@ public class testBackUpMonitor {
properties.setProperty("javax.persistence.jdbc.url", "jdbc:mariadb://localhost:3306/onap_sdk");
properties.setProperty("javax.persistence.jdbc.user", "");
properties.setProperty("javax.persistence.jdbc.password", "password");
- BackUpMonitor bum = BackUpMonitor.getInstance(BackUpMonitor.ResourceNode.BRMS.toString(), "brms_test" , properties, new Handler());
+ BackUpMonitor bum = BackUpMonitor.getInstance(BackUpMonitor.ResourceNode.BRMS.toString(), "brms_test" , properties, new DummyBackUpHandler());
assertNull(bum);
}
@@ -87,7 +87,7 @@ public class testBackUpMonitor {
properties.setProperty("javax.persistence.jdbc.user", "test");
properties.setProperty("javax.persistence.jdbc.password", "password");
properties.setProperty("ping_interval", "500");
- BackUpMonitor bum = BackUpMonitor.getInstance(BackUpMonitor.ResourceNode.BRMS.toString(), "brms_test" , properties, new Handler());
+ BackUpMonitor bum = BackUpMonitor.getInstance(BackUpMonitor.ResourceNode.BRMS.toString(), "brms_test" , properties, new DummyBackUpHandler());
assertNull(bum);
}
@@ -99,7 +99,7 @@ public class testBackUpMonitor {
properties.setProperty("javax.persistence.jdbc.user", "test");
properties.setProperty("javax.persistence.jdbc.password", "password");
properties.setProperty("ping_interval", "500");
- BackUpMonitor bum = BackUpMonitor.getInstance(BackUpMonitor.ResourceNode.BRMS.toString(), "brms_test" , properties, new Handler());
+ BackUpMonitor bum = BackUpMonitor.getInstance(BackUpMonitor.ResourceNode.BRMS.toString(), "brms_test" , properties, new DummyBackUpHandler());
assertNull(bum);
}
@@ -111,7 +111,7 @@ public class testBackUpMonitor {
properties.setProperty("javax.persistence.jdbc.user", "test");
properties.setProperty("javax.persistence.jdbc.password", "password");
properties.setProperty("ping_interval", "");
- BackUpMonitor bum = BackUpMonitor.getInstance(null, "brms_test" , properties, new Handler());
+ BackUpMonitor bum = BackUpMonitor.getInstance(null, "brms_test" , properties, new DummyBackUpHandler());
assertNull(bum);
}
@@ -122,13 +122,13 @@ public class testBackUpMonitor {
properties.setProperty("javax.persistence.jdbc.url", "jdbc:mariadb://localhost:3306/onap_sdk");
properties.setProperty("javax.persistence.jdbc.user", "test");
properties.setProperty("javax.persistence.jdbc.password", "password");
- BackUpMonitor bum = BackUpMonitor.getInstance(BackUpMonitor.ResourceNode.BRMS.toString(), null , properties, new Handler());
+ BackUpMonitor bum = BackUpMonitor.getInstance(BackUpMonitor.ResourceNode.BRMS.toString(), null , properties, new DummyBackUpHandler());
assertNull(bum);
}
@Test
public void backUpMonitorTestFailNoProperties() throws Exception{
- BackUpMonitor bum = BackUpMonitor.getInstance(BackUpMonitor.ResourceNode.BRMS.toString(), "brms_test" , null, new Handler());
+ BackUpMonitor bum = BackUpMonitor.getInstance(BackUpMonitor.ResourceNode.BRMS.toString(), "brms_test" , null, new DummyBackUpHandler());
assertNull(bum);
}
@@ -153,7 +153,7 @@ public class testBackUpMonitor {
properties.setProperty("javax.persistence.jdbc.password", "");
properties.setProperty("ping_interval", "123a");
properties.setProperty(PersistenceUnitProperties.ECLIPSELINK_PERSISTENCE_XML, "META-INF/persistencePUtest.xml");
- BackUpMonitor bum = BackUpMonitor.getInstance(BackUpMonitor.ResourceNode.BRMS.toString(), "brms_test" , properties, new Handler());
+ BackUpMonitor bum = BackUpMonitor.getInstance(BackUpMonitor.ResourceNode.BRMS.toString(), "brms_test" , properties, new DummyBackUpHandler());
assertTrue(bum.getFlag());
}
@@ -167,7 +167,7 @@ public class testBackUpMonitor {
properties.setProperty("javax.persistence.jdbc.password", "");
properties.setProperty("ping_interval", "500");
properties.setProperty(PersistenceUnitProperties.ECLIPSELINK_PERSISTENCE_XML, "META-INF/persistencePUtest.xml");
- BackUpMonitor bum = BackUpMonitor.getInstance(BackUpMonitor.ResourceNode.BRMS.toString(), "brms_test" , properties, new Handler());
+ BackUpMonitor bum = BackUpMonitor.getInstance(BackUpMonitor.ResourceNode.BRMS.toString(), "brms_test" , properties, new DummyBackUpHandler());
createPolicyNotification();
assertTrue(bum.getFlag());
// Start a slave check.
diff --git a/PolicyEngineUtils/src/test/java/org/onap/policy/utils/test/Handler.java b/PolicyEngineUtils/src/test/java/org/onap/policy/utils/test/DummyBackUpHandler.java
index 91f467b60..15fb33944 100644
--- a/PolicyEngineUtils/src/test/java/org/onap/policy/utils/test/Handler.java
+++ b/PolicyEngineUtils/src/test/java/org/onap/policy/utils/test/DummyBackUpHandler.java
@@ -23,7 +23,7 @@ package org.onap.policy.utils.test;
import org.onap.policy.api.PDPNotification;
import org.onap.policy.utils.BackUpHandler;
-public class Handler implements BackUpHandler{
+public class DummyBackUpHandler implements BackUpHandler{
@Override
public void notificationReceived(PDPNotification notification) {