one more case added in DmaapClientUtilTest.java
[dmaap/messagerouter/dmaapclient.git] / src / test / java / org / onap / dmaap / mr / tools / MRCommandContextTest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP Policy Engine
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.dmaap.mr.tools;
22
23 import static org.junit.Assert.assertTrue;
24
25 import java.io.FileNotFoundException;
26 import java.io.IOException;
27 import java.io.PrintStream;
28 import java.util.ArrayList;
29 import java.util.concurrent.TimeUnit;
30
31 import org.junit.After;
32 import org.junit.Before;
33 import org.junit.Test;
34
35 import com.att.nsa.apiClient.http.HttpTracer;
36 import com.att.nsa.cmdtool.CommandNotReadyException;
37 import org.onap.dmaap.mr.client.HostSelector;
38 import org.onap.dmaap.mr.client.MRClient;
39 import org.onap.dmaap.mr.client.MRPublisher.message;
40 import org.onap.dmaap.mr.test.support.MRBatchingPublisherMock.Entry;
41
42 public class MRCommandContextTest {
43         private MRCommandContext command = null;
44         private String[] parts = new String[5];
45
46         @Before
47         public void setUp() throws Exception {
48                 command = new MRCommandContext();
49
50                 for (int i = 0; i < parts.length; i++) {
51                         parts[i] = "String" + (i + 1);
52                 }
53
54         }
55
56         @After
57         public void tearDown() throws Exception {
58
59         }
60
61         @Test
62         public void testRequestShutdown() {
63
64                 command.requestShutdown();
65                 assertTrue(true);
66
67         }
68
69         @Test
70         public void testShouldContinue() {
71
72                 command.shouldContinue();
73                 assertTrue(true);
74
75         }
76
77         @Test
78         public void testSetAuth() {
79
80                 command.setAuth("key", "pwd");
81                 assertTrue(true);
82
83         }
84
85         @Test
86         public void testClearAuth() {
87
88                 command.clearAuth();
89                 assertTrue(true);
90
91         }
92
93         @Test
94         public void testCheckClusterReady() {
95
96                 command.checkClusterReady();
97                 assertTrue(true);
98
99         }
100
101         @Test
102         public void testGetCluster() {
103
104                 command.getCluster();
105                 assertTrue(true);
106
107         }
108
109         @Test
110         public void testClearCluster() {
111
112                 command.clearCluster();
113                 assertTrue(true);
114
115         }
116
117         @Test
118         public void testAddClusterHost() {
119
120                 command.addClusterHost("host");
121                 assertTrue(true);
122
123         }
124
125         @Test
126         public void testGetApiKey() {
127
128                 command.getApiKey();
129                 assertTrue(true);
130
131         }
132
133         @Test
134         public void testGetApiPwd() {
135
136                 command.getApiPwd();
137                 assertTrue(true);
138
139         }
140
141         @Test
142         public void testUseTracer() {
143
144                 command.useTracer(null);
145                 assertTrue(true);
146
147         }
148
149         @Test
150         public void testNoTracer() {
151
152                 command.noTracer();
153                 assertTrue(true);
154
155         }
156
157         @Test
158         public void testApplyTracer() {
159
160                 command.applyTracer(null);
161                 assertTrue(true);
162
163         }
164
165 }