diff options
Diffstat (limited to 'src/test/java/com')
-rw-r--r-- | src/test/java/com/att/nsa/mr/client/MRClientBuildersTest.java | 272 |
1 files changed, 135 insertions, 137 deletions
diff --git a/src/test/java/com/att/nsa/mr/client/MRClientBuildersTest.java b/src/test/java/com/att/nsa/mr/client/MRClientBuildersTest.java index 2e7d05d..9a0a3ce 100644 --- a/src/test/java/com/att/nsa/mr/client/MRClientBuildersTest.java +++ b/src/test/java/com/att/nsa/mr/client/MRClientBuildersTest.java @@ -4,6 +4,8 @@ * ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright © 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -36,215 +38,211 @@ import com.att.nsa.mr.client.MRClientBuilders; public class MRClientBuildersTest {
- private Collection<String> hostSet = new ArrayList<String>();
- private MRClientBuilders.ConsumerBuilder builder = null;
- private MRClientBuilders.PublisherBuilder pBuilder = null;
- private MRClientBuilders mrcBuilders = null;
-
- private String[] hostArray = new String[10];
-
- @Before
- public void setUp() throws Exception {
+ private Collection<String> hostSet = new ArrayList<String>();
+ private MRClientBuilders.ConsumerBuilder builder = null;
+ private MRClientBuilders.PublisherBuilder pBuilder = null;
+ private String[] hostArray = new String[10];
- for (int i = 0; i < 10; i++) {
- hostSet.add("host" + (i + 1));
- hostArray[i] = "host" + (i + 1);
- }
+ @Before
+ public void setUp() throws Exception {
- builder = new MRClientBuilders.ConsumerBuilder();
+ for (int i = 0; i < 10; i++) {
+ hostSet.add("host" + (i + 1));
+ hostArray[i] = "host" + (i + 1);
+ }
- pBuilder = new MRClientBuilders.PublisherBuilder();
+ builder = new MRClientBuilders.ConsumerBuilder();
- mrcBuilders = new MRClientBuilders();
+ pBuilder = new MRClientBuilders.PublisherBuilder();
- }
+ }
- @After
- public void tearDown() throws Exception {
+ @After
+ public void tearDown() throws Exception {
- }
+ }
- @Test
- public void testUsingHosts() {
+ @Test
+ public void testUsingHosts() {
- builder.usingHosts("hostList");
- assertTrue(true);
+ builder.usingHosts("hostList");
+ assertTrue(true);
- }
+ }
- @Test
- public void testUsingHosts2() {
+ @Test
+ public void testUsingHosts2() {
- builder.usingHosts(hostSet);
- assertTrue(true);
+ builder.usingHosts(hostSet);
+ assertTrue(true);
- }
+ }
- @Test
- public void testOnTopic() {
+ @Test
+ public void testOnTopic() {
- builder.onTopic("testTopic");
- assertTrue(true);
+ builder.onTopic("testTopic");
+ assertTrue(true);
- }
+ }
- @Test
- public void testKnownAs() {
+ @Test
+ public void testKnownAs() {
- builder.knownAs("CG1", "23");
- assertTrue(true);
+ builder.knownAs("CG1", "23");
+ assertTrue(true);
- }
+ }
- @Test
- public void testAuthenticatedBy() {
+ @Test
+ public void testAuthenticatedBy() {
- builder.authenticatedBy("apikey", "apisecret");
- assertTrue(true);
+ builder.authenticatedBy("apikey", "apisecret");
+ assertTrue(true);
- }
+ }
- @Test
- public void testWaitAtServer() {
+ @Test
+ public void testWaitAtServer() {
- builder.waitAtServer(100);
- assertTrue(true);
+ builder.waitAtServer(100);
+ assertTrue(true);
- }
+ }
- @Test
- public void testReceivingAtMost() {
+ @Test
+ public void testReceivingAtMost() {
- builder.receivingAtMost(100);
- assertTrue(true);
+ builder.receivingAtMost(100);
+ assertTrue(true);
- }
+ }
- @Test
- public void testWithServerSideFilter() {
+ @Test
+ public void testWithServerSideFilter() {
- builder.withServerSideFilter("filter");
- assertTrue(true);
+ builder.withServerSideFilter("filter");
+ assertTrue(true);
- }
+ }
- @Test
- public void testBuild() {
+ @Test
+ public void testBuild() {
- try {
+ try {
- builder.build();
- } catch (IllegalArgumentException e) {
- assertTrue(true);
- }
+ builder.build();
+ } catch (IllegalArgumentException e) {
+ assertTrue(true);
+ }
- }
+ }
- @Test
- public void testUsingHosts3() {
+ @Test
+ public void testUsingHosts3() {
- pBuilder.usingHosts("testTopic");
- assertTrue(true);
+ pBuilder.usingHosts("testTopic");
+ assertTrue(true);
- }
+ }
- @Test
- public void testUsingHosts4() {
+ @Test
+ public void testUsingHosts4() {
- pBuilder.usingHosts(hostArray);
- assertTrue(true);
+ pBuilder.usingHosts(hostArray);
+ assertTrue(true);
- }
+ }
- @Test
- public void testUsingHosts5() {
+ @Test
+ public void testUsingHosts5() {
- pBuilder.usingHosts(hostSet);
- assertTrue(true);
+ pBuilder.usingHosts(hostSet);
+ assertTrue(true);
- }
+ }
- @Test
- public void testOnTopic2() {
+ @Test
+ public void testOnTopic2() {
- pBuilder.onTopic("testTopic");
- assertTrue(true);
+ pBuilder.onTopic("testTopic");
+ assertTrue(true);
- }
+ }
- @Test
- public void testLimitBatch() {
+ @Test
+ public void testLimitBatch() {
- pBuilder.limitBatch(100, 10);
- assertTrue(true);
+ pBuilder.limitBatch(100, 10);
+ assertTrue(true);
- }
+ }
- @Test
- public void testWithCompresion() {
+ @Test
+ public void testWithCompresion() {
- pBuilder.withCompresion();
- assertTrue(true);
+ pBuilder.withCompresion();
+ assertTrue(true);
- }
+ }
- @Test
- public void testWithoutCompresion() {
+ @Test
+ public void testWithoutCompresion() {
- pBuilder.withoutCompresion();
- assertTrue(true);
+ pBuilder.withoutCompresion();
+ assertTrue(true);
- }
+ }
- @Test
- public void testEnableCompresion() {
+ @Test
+ public void testEnableCompresion() {
- pBuilder.enableCompresion(true);
- assertTrue(true);
+ pBuilder.enableCompresion(true);
+ assertTrue(true);
- }
+ }
- @Test
- public void testAuthenticatedBy2() {
+ @Test
+ public void testAuthenticatedBy2() {
- pBuilder.authenticatedBy("apikey", "apisecret");
- assertTrue(true);
+ pBuilder.authenticatedBy("apikey", "apisecret");
+ assertTrue(true);
- }
+ }
- @Test
- public void testBuild2() {
+ @Test
+ public void testBuild2() {
- try {
+ try {
- pBuilder.build();
- } catch (IllegalArgumentException e) {
- assertTrue(true);
- }
+ pBuilder.build();
+ } catch (IllegalArgumentException e) {
+ assertTrue(true);
+ }
- }
+ }
- @Test
- public void test$testInject() {
+ @Test
+ public void test$testInject() {
- try {
+ try {
- mrcBuilders.$testInject(builder.build());
- } catch (IllegalArgumentException e) {
- assertTrue(true);
- }
+ MRClientBuilders.$testInject(builder.build());
+ } catch (IllegalArgumentException e) {
+ assertTrue(true);
+ }
- }
+ }
- @Test
- public void test$testInject2() {
+ @Test
+ public void test$testInject2() {
- try {
+ try {
- mrcBuilders.$testInject(pBuilder.build());
- } catch (IllegalArgumentException e) {
- assertTrue(true);
- }
+ MRClientBuilders.$testInject(pBuilder.build());
+ } catch (IllegalArgumentException e) {
+ assertTrue(true);
+ }
- }
+ }
}
|