Skip to content

Commit 12338db

Browse files
committed
test(Assistant v1): Don't test exact equality of JSON responses in unit tests
1 parent 06c347b commit 12338db

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

assistant/src/test/java/com/ibm/watson/developer_cloud/assistant/v1/AssistantTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public void testSendMessage() throws IOException, InterruptedException {
166166

167167
String path = StringUtils.join(PATH_MESSAGE, "?", VERSION, "=2018-07-10");
168168
assertEquals(path, request.getPath());
169-
assertArrayEquals(new String[] { "Great choice! Playing some jazz for you." },
169+
assertArrayEquals(new String[]{"Great choice! Playing some jazz for you."},
170170
serviceResponse.getOutput().getText().toArray(new String[0]));
171171
assertEquals(request.getMethod(), "POST");
172172
assertNotNull(request.getHeader(HttpHeaders.AUTHORIZATION));
@@ -183,7 +183,6 @@ public void testSendMessage() throws IOException, InterruptedException {
183183
assertNotNull(serviceResponse.getOutput().getNodesVisitedDetails().get(0).getTitle());
184184
assertNotNull(serviceResponse.getOutput().getNodesVisitedDetails().get(0).getConditions());
185185
assertNotNull(serviceResponse.getOutput().getNodesVisitedDetails().get(0).getConditions());
186-
assertEquals(serviceResponse, mockResponse);
187186
}
188187

189188
/**
@@ -224,7 +223,6 @@ public void testSendMessageWithAlternateIntents() throws IOException, Interrupte
224223
serviceResponse.getOutput().getText().toArray(new String[0]));
225224
assertEquals(request.getMethod(), "POST");
226225
assertNotNull(request.getHeader(HttpHeaders.AUTHORIZATION));
227-
assertEquals(serviceResponse, mockResponse);
228226
}
229227

230228
/**

0 commit comments

Comments
 (0)