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>
import org.onap.policy.pdp.rest.api.models.PolicyConfig;
import org.onap.policy.pdp.rest.api.services.GetConfigService;
import org.onap.policy.pdp.rest.api.models.PolicyConfig;
import org.onap.policy.pdp.rest.api.services.GetConfigService;
-public class getConfigTest {
+public class GetConfigServiceTest {
private static final String TEST = "test";
@SuppressWarnings("unchecked")
private static final String TEST = "test";
@SuppressWarnings("unchecked")
import org.onap.policy.api.DictionaryParameters;
import org.onap.policy.pdp.rest.api.services.GetDictionaryService;
import org.onap.policy.api.DictionaryParameters;
import org.onap.policy.pdp.rest.api.services.GetDictionaryService;
-public class getDictionaryTest {
+public class GetDictionaryServiceTest {
@Test
public void dictionaryJsonTest() throws Exception{
@Test
public void dictionaryJsonTest() throws Exception{
import javax.servlet.SessionTrackingMode;
import javax.servlet.descriptor.JspConfigDescriptor;
import javax.servlet.SessionTrackingMode;
import javax.servlet.descriptor.JspConfigDescriptor;
-public class ServerContextImpl implements ServletContext {
+public class DummyServerContextImpl implements ServletContext {
@Override
public String getContextPath() {
@Override
public String getContextPath() {
try {
PdpRestMBeanListener listener = new PdpRestMBeanListener();
try {
PdpRestMBeanListener listener = new PdpRestMBeanListener();
- ServerContextImpl source = new ServerContextImpl();
+ DummyServerContextImpl source = new DummyServerContextImpl();
ServletContextEvent event = new ServletContextEvent(source);
listener.contextInitialized(event);
ServletContextEvent event = new ServletContextEvent(source);
listener.contextInitialized(event);
import org.onap.policy.common.logging.flexlogger.FlexLogger;
import org.onap.policy.common.logging.flexlogger.Logger;
import org.onap.policy.common.logging.flexlogger.FlexLogger;
import org.onap.policy.common.logging.flexlogger.Logger;
-public class Handler implements NotificationHandler{
+public class DummyNotificationHandler implements NotificationHandler{
- private static final Logger LOGGER = FlexLogger.getLogger(Handler.class);
+ private static final Logger LOGGER = FlexLogger.getLogger(DummyNotificationHandler.class);
@Override
public void notificationReceived(PDPNotification notification) {
@Override
public void notificationReceived(PDPNotification notification) {
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.JsonProcessingException;
-public class testBackUpMonitor {
+public class BackUpMonitorTest {
@Test (expected = PersistenceException.class)
public void backUpMonitorTestFail() throws Exception{
@Test (expected = PersistenceException.class)
public void backUpMonitorTestFail() throws Exception{
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", "");
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());
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");
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());
properties.setProperty("javax.persistence.jdbc.user", "test");
properties.setProperty("javax.persistence.jdbc.password", "password");
properties.setProperty("ping_interval", "500");
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());
properties.setProperty("javax.persistence.jdbc.user", "test");
properties.setProperty("javax.persistence.jdbc.password", "password");
properties.setProperty("ping_interval", "500");
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());
properties.setProperty("javax.persistence.jdbc.user", "test");
properties.setProperty("javax.persistence.jdbc.password", "password");
properties.setProperty("ping_interval", "");
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());
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");
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{
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());
properties.setProperty("javax.persistence.jdbc.password", "");
properties.setProperty("ping_interval", "123a");
properties.setProperty(PersistenceUnitProperties.ECLIPSELINK_PERSISTENCE_XML, "META-INF/persistencePUtest.xml");
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());
}
assertTrue(bum.getFlag());
}
properties.setProperty("javax.persistence.jdbc.password", "");
properties.setProperty("ping_interval", "500");
properties.setProperty(PersistenceUnitProperties.ECLIPSELINK_PERSISTENCE_XML, "META-INF/persistencePUtest.xml");
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.
createPolicyNotification();
assertTrue(bum.getFlag());
// Start a slave check.
import org.onap.policy.api.PDPNotification;
import org.onap.policy.utils.BackUpHandler;
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) {
@Override
public void notificationReceived(PDPNotification notification) {