Code Review
/
dmaap
/
dbcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
not used methods were removed, minor sonar fixes
[dmaap/dbcapi.git]
/
src
/
test
/
java
/
org
/
onap
/
dmaap
/
dbcapi
/
service
/
MR_ClientServiceTest.java
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
(file)
--- 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() ));
}
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 );
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<MR_Client> l = cls.getAllMr_Clients();
public void test4() {
List<MR_Client> l = cls.getAllMr_Clients();
-
Array
List<MR_Client> al = cls.getAllMrClients( "foo" );
+ List<MR_Client> al = cls.getAllMrClients( "foo" );
-
Array
List<MR_Client> al2 = cls.getClientsByLocation( "central" );
+ List<MR_Client> al2 = cls.getClientsByLocation( "central" );
}
@Test
}
@Test
- public void
test5
() {
+ public void
AddSubscriberToTopic
() {
Topic topic = factory.genSimpleTopic( "test5" );
ApiError err = new ApiError();
Topic nTopic = ts.addTopic( topic, err, false );
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 );
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 );
+
+
+ }
+
}
}