--- /dev/null
+/*-\r
+ * ============LICENSE_START=======================================================\r
+ * ONAP Policy Engine\r
+ * ================================================================================\r
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.\r
+ * ================================================================================\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * ============LICENSE_END=========================================================\r
+ */\r
+\r
+package com.att.nsa.mr.client;\r
+\r
+import static org.junit.Assert.assertTrue;\r
+\r
+import java.io.IOException;\r
+import java.util.ArrayList;\r
+import java.util.Collection;\r
+import java.util.concurrent.TimeUnit;\r
+\r
+import org.junit.After;\r
+import org.junit.Before;\r
+import org.junit.Test;\r
+\r
+import com.att.nsa.mr.client.HostSelector;\r
+import com.att.nsa.mr.client.MRClient;\r
+import com.att.nsa.mr.client.MRClientBuilders;\r
+import com.att.nsa.mr.client.MRClientFactory;\r
+\r
+public class MRClientFactoryTest {\r
+\r
+ private Collection<String> hostSet = new ArrayList<String>();\r
+\r
+ private MRClientFactory factory = null;\r
+\r
+ private String[] hostArray = new String[10];\r
+\r
+ @Before\r
+ public void setUp() throws Exception {\r
+\r
+ for (int i = 0; i < 10; i++) {\r
+ hostSet.add("host" + (i + 1));\r
+ hostArray[i] = "host" + (i + 1);\r
+ }\r
+\r
+ factory = new MRClientFactory();\r
+\r
+ }\r
+\r
+ @After\r
+ public void tearDown() throws Exception {\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testCreateConsumer() {\r
+\r
+ /* MRClientFactory.createConsumer("hostList hostList2", "testTopic");\r
+ assertTrue(true);*/\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testCreateConsumer2() {\r
+\r
+ /* MRClientFactory.createConsumer(hostSet, "testTopic");\r
+ assertTrue(true);*/\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testCreateConsumer3() {\r
+\r
+ /* MRClientFactory.createConsumer(hostSet, "testTopic", "filter");\r
+ assertTrue(true);*/\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testCreateConsumer4() {\r
+\r
+// MRClientFactory.createConsumer(hostSet, "testTopic", "CG1", "22");\r
+// assertTrue(true);\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testCreateConsumer5() {\r
+\r
+/* MRClientFactory.createConsumer(hostSet, "testTopic", "CG1", "22", 100, 100);\r
+ assertTrue(true);*/\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testCreateConsumer6() {\r
+\r
+ /* MRClientFactory.createConsumer("hostList", "testTopic", "CG1", "22", 100, 100, "filter", "apikey", "apisecret");\r
+ assertTrue(true);\r
+*/\r
+ }\r
+\r
+ @Test\r
+ public void testCreateConsumer7() {\r
+\r
+/* MRClientFactory.createConsumer(hostSet, "testTopic", "CG1", "22", 100, 100, "filter", "apikey", "apisecret");\r
+ assertTrue(true);*/\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testCreateSimplePublisher() {\r
+\r
+/* MRClientFactory.createSimplePublisher("hostList", "testTopic");\r
+ assertTrue(true);*/\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testCreateBatchingPublisher1() {\r
+/*\r
+ MRClientFactory.createBatchingPublisher("hostList", "testTopic", 100, 10);\r
+ assertTrue(true);*/\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testCreateBatchingPublisher2() {\r
+/*\r
+ MRClientFactory.createBatchingPublisher("hostList", "testTopic", 100, 10, true);\r
+ assertTrue(true);\r
+*/\r
+ }\r
+\r
+ @Test\r
+ public void testCreateBatchingPublisher3() {\r
+/*\r
+ MRClientFactory.createBatchingPublisher(hostArray, "testTopic", 100, 10, true);\r
+ assertTrue(true);*/\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testCreateBatchingPublisher4() {\r
+\r
+// MRClientFactory.createBatchingPublisher(hostSet, "testTopic", 100, 10, true);\r
+// assertTrue(true);\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testCreateBatchingPublisher5() {\r
+//\r
+// MRClientFactory.createBatchingPublisher("host", "testTopic", "username", "password", 100, 10, true,\r
+// "protocolFlag", "/producer");\r
+// assertTrue(true);\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testCreateBatchingPublisher6() {\r
+//\r
+// try {\r
+// MRClientFactory.createBatchingPublisher("/producer");\r
+// } catch (IOException e) {\r
+// // TODO Auto-generated catch block\r
+// e.printStackTrace();\r
+// }\r
+// assertTrue(true);\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testCreateBatchingPublisher7() {\r
+\r
+ /* try {\r
+ MRClientFactory.createBatchingPublisher("/producer", true);\r
+ } catch (IOException e) {\r
+ // TODO Auto-generated catch block\r
+ e.printStackTrace();\r
+ }\r
+ assertTrue(true);*/\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testCreateIdentityManager() {\r
+/*\r
+ MRClientFactory.createIdentityManager(hostSet, "apikey", "apisecret");\r
+\r
+ assertTrue(true);*/\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testCreateTopicManager() {\r
+\r
+ /* MRClientFactory.createTopicManager(hostSet, "apikey", "apisecret");\r
+\r
+ assertTrue(true);*/\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testCreateConsumer8() {\r
+/*\r
+ try {\r
+ MRClientFactory.createConsumer("/consumer");\r
+ } catch (IOException e) {\r
+ // TODO Auto-generated catch block\r
+ e.printStackTrace();\r
+ }\r
+\r
+ assertTrue(true);*/\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testCreateConsumer9() {\r
+\r
+// MRClientFactory.createConsumer("host", "topic", "username", "password", "group", "23", "protocolFlag",\r
+// "/consumer", 1, 2);\r
+//\r
+// assertTrue(true);\r
+\r
+ }\r
+\r
+ @Test\r
+ public void testCreateConsumer10() {\r
+\r
+// MRClientFactory.createConsumer("host", "topic", "username", "password", "group", "23", 1, 2, "protocolFlag",\r
+// "/consumer");\r
+//\r
+// assertTrue(true);\r
+\r
+ }\r
+ \r
+ @Test\r
+ public void test$testInject() {\r
+\r
+/* MRClientFactory.$testInject(null);\r
+ assertTrue(true);*/\r
+\r
+ }\r
+\r
+}
\ No newline at end of file