X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdbcapi%2Fservice%2FMR_ClientServiceTest.java;h=0456d10b46f741f43e7b60af2db82e5b0dc32bd9;hb=5eeb7b8e6f7c4bbe5da8d08a8145109e2f05329f;hp=dcdfcdf8eed21c90762607caab389dac08a108a6;hpb=87bf9245434ad317ea39a84a0099233197f3d7c2;p=dmaap%2Fdbcapi.git diff --git a/src/test/java/org/onap/dmaap/dbcapi/service/MR_ClientServiceTest.java b/src/test/java/org/onap/dmaap/dbcapi/service/MR_ClientServiceTest.java index dcdfcdf..0456d10 100644 --- a/src/test/java/org/onap/dmaap/dbcapi/service/MR_ClientServiceTest.java +++ b/src/test/java/org/onap/dmaap/dbcapi/service/MR_ClientServiceTest.java @@ -97,7 +97,7 @@ public class MR_ClientServiceTest { if ( nTopic != null ) { assertTrue( nTopic.getTopicName().equals( topic.getTopicName() )); } - String[] actions = { "pub", "view" }; + MR_Client c = factory.genPublisher( "edge", topic.getFqtn() ); c = cls.addMr_Client( c, topic, err ); @@ -108,13 +108,13 @@ public class MR_ClientServiceTest { public void test4() { List l = cls.getAllMr_Clients(); - ArrayList al = cls.getAllMrClients( "foo" ); + List al = cls.getAllMrClients( "foo" ); - ArrayList al2 = cls.getClientsByLocation( "central" ); + List al2 = cls.getClientsByLocation( "central" ); } @Test - public void test5() { + public void AddSubscriberToTopic() { Topic topic = factory.genSimpleTopic( "test5" ); ApiError err = new ApiError(); Topic nTopic = ts.addTopic( topic, err, false ); @@ -124,11 +124,13 @@ public class MR_ClientServiceTest { MR_Client c = factory.genPublisher( "central", topic.getFqtn() ); c = cls.addMr_Client( c, topic, err ); - if ( c != null ) { - c = factory.genSubscriber( "central", topic.getFqtn() ); - c = cls.updateMr_Client( c, err ); - assertTrue( err.getCode() == 200 ); - } - } + assertTrue( c != null ); + c = factory.genSubscriber( "central", topic.getFqtn() ); + c = cls.addMr_Client( c, topic, err ); + assertTrue( err.getCode() == 200 ); + + + } + }