X-Git-Url: https://gerrit.onap.org/r/gitweb?p=dmaap%2Fdbcapi.git;a=blobdiff_plain;f=src%2Ftest%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdbcapi%2Fservice%2FDR_NodeServiceTest.java;h=3f29d42f6585938ee482df2503fae4c549f96798;hp=4f92bcde88c4740d5e19fa52ae66a97fbca893ca;hb=d5d37c0477744cbaa6a9d9fc690c0dafbb2d1868;hpb=bc9afa1b8ff000d7178dfa2f582775fc2a6613a3 diff --git a/src/test/java/org/onap/dmaap/dbcapi/service/DR_NodeServiceTest.java b/src/test/java/org/onap/dmaap/dbcapi/service/DR_NodeServiceTest.java index 4f92bcd..3f29d42 100644 --- a/src/test/java/org/onap/dmaap/dbcapi/service/DR_NodeServiceTest.java +++ b/src/test/java/org/onap/dmaap/dbcapi/service/DR_NodeServiceTest.java @@ -18,7 +18,10 @@ * ============LICENSE_END========================================================= */ package org.onap.dmaap.dbcapi.service; + import org.onap.dmaap.dbcapi.model.*; +import org.onap.dmaap.dbcapi.testframework.DmaapObjectFactory; +import org.onap.dmaap.dbcapi.testframework.ReflectionHarness; import static org.junit.Assert.*; @@ -33,6 +36,7 @@ public class DR_NodeServiceTest { private static final String fmt = "%24s: %s%n"; ReflectionHarness rh = new ReflectionHarness(); + static DmaapObjectFactory factory = new DmaapObjectFactory(); DR_NodeService ns; @@ -67,7 +71,7 @@ public class DR_NodeServiceTest { String locname = "central-demo"; DcaeLocationService dls = new DcaeLocationService(); - DcaeLocation loc = new DcaeLocation( "CLLI1234", "central-onap", locname, "aZone", "10.10.10.0/24" ); + DcaeLocation loc = factory.genDcaeLocation( "central" ); dls.addDcaeLocation( loc ); ApiError err = new ApiError(); @@ -89,38 +93,5 @@ public class DR_NodeServiceTest { } -/* - @Test - public void test4() { - List l = cls.getAllMr_Clients(); - - ArrayList al = cls.getAllMrClients( "foo" ); - - ArrayList al2 = cls.getClientsByLocation( "central" ); - } - - @Test - public void test5() { - Topic topic = new Topic(); - ApiError err = new ApiError(); - topic.setTopicName( "test3" ); - topic.setFqtnStyle( FqtnType.Validator("none") ); - topic.getFqtn(); - Topic nTopic = ts.addTopic( topic, err ); - if ( nTopic != null ) { - assertTrue( nTopic.getTopicName().equals( topic.getTopicName() )); - } - String[] actions = { "pub", "view" }; - MR_Client c = new MR_Client( "central-onap", "org.onap.dmaap.demo.interestingTopic2", "org.onap.clientApp.publisher", actions ); - - c = cls.addMr_Client( c, topic, err ); - if ( c != null ) { - actions[0] = "sub"; - c.setAction( actions ); - c = cls.updateMr_Client( c, err ); - assertTrue( err.getCode() == 200 ); - } - } -*/ }