File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/test/java/com/microsoft/graph/functional Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 66import java .io .IOException ;
77
88import com .microsoft .graph .content .MSBatchRequestContent ;
9+ import com .microsoft .graph .content .MSBatchResponseContent ;
910import com .microsoft .graph .http .HttpMethod ;
1011import com .microsoft .graph .httpcore .HttpClients ;
1112import com .microsoft .graph .httpcore .ICoreAuthenticationProvider ;
@@ -64,6 +65,12 @@ public void GetsABatchFromRequests() throws IOException{
6465
6566 final OkHttpClient client = HttpClients .createDefault ((ICoreAuthenticationProvider )graphServiceClient .getAuthenticationProvider ());
6667 final Response batchResponse = client .newCall (batchRequest ).execute ();
67- assertEquals (batchResponse .code (), 200 );
68+ assertEquals (200 , batchResponse .code ());
69+
70+ final MSBatchResponseContent responseContent = new MSBatchResponseContent (batchResponse );
71+
72+ assertEquals (400 , responseContent .getResponseById (userPostId ).code ()); //400:we're not providing enough properties for the call to go through
73+ assertEquals (200 , responseContent .getResponseById (meGetId ).code ());
74+ assertEquals (200 , responseContent .getResponseById (usersGetId ).code ());
6875 }
6976}
You can’t perform that action at this time.
0 commit comments