Skip to content

Commit 557603b

Browse files
baywetMustafa Zengin
andauthored
Apply suggestions from code review
Co-authored-by: Mustafa Zengin <muzengin@microsoft.com>
1 parent e9d2433 commit 557603b

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎src/test/java/com/microsoft/graph/content/BatchRequestContentTest.java‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void testBatchRequestContentCreation() throws MalformedURLException {
5656
when(requestStep.getRequestUrl()).thenReturn(new URL(testurl));
5757
requestContent.addBatchRequestStep(requestStep);
5858
}
59-
assertTrue(requestContent.requests != null);
59+
assertNotNull(requestContent.requests);
6060
}
6161

6262
@Test
@@ -177,17 +177,17 @@ public void usesHttpMethodFromRequestIfAlreadySet() throws MalformedURLException
177177
when(requestStep.getHttpMethod()).thenReturn(HttpMethod.DELETE);
178178
final BatchRequestContent batchRequest = new BatchRequestContent();
179179
final String stepId = batchRequest.addBatchRequestStep(requestStep);
180-
assertEquals("DELETE", batchRequest.getStepById(stepId).method);
180+
assertEquals(HttpMethod.DELETE.toString(), batchRequest.getStepById(stepId).method);
181181
}
182182

183183
@Test
184-
public void doesntThrowWhenTryingToRemoveRequestFromNull() {
184+
public void doesNotThrowWhenTryingToRemoveRequestFromNull() {
185185
final BatchRequestContent batchRequest = new BatchRequestContent();
186186
batchRequest.removeBatchRequestStepWithId("id");
187187
}
188188

189189
@Test
190-
public void doesntRemoveDependsOnWhenNotEmpty() throws MalformedURLException {
190+
public void doesNotRemoveDependsOnWhenNotEmpty() throws MalformedURLException {
191191
IHttpRequest requestStep = mock(IHttpRequest.class);
192192
when(requestStep.getRequestUrl()).thenReturn(new URL(testurl));
193193
final BatchRequestContent batchRequest = new BatchRequestContent();
@@ -236,10 +236,10 @@ public AdditionalDataManager additionalDataManager() {
236236
assertNotNull(step3.headers);
237237
assertNull(step3.headers.get("content-type"));
238238

239-
when(requestStep.getHeaders()).thenReturn(Arrays.asList(new HeaderOption("Content-type", "application/octect-stream")));
239+
when(requestStep.getHeaders()).thenReturn(Arrays.asList(new HeaderOption("Content-type", "application/octet-stream")));
240240
final String stepId4 = batchRequest.addBatchRequestStep(requestStep, HttpMethod.POST, Integer.valueOf(10));
241241
final BatchRequestStep<?> step4 = batchRequest.getStepById(stepId4);
242242
assertNotNull(step4.headers);
243-
assertEquals("application/octect-stream", step4.headers.get("content-type"));
243+
assertEquals("application/octet-stream", step4.headers.get("content-type"));
244244
}
245245
}

0 commit comments

Comments
 (0)