use of com.microsoft.graph.options.QueryOption in project msgraph-sdk-java by microsoftgraph.
the class BaseRequestTests method testQueryParameters.
@Test
public void testQueryParameters() {
final Option q1 = new QueryOption("q1", "option1 ");
final Option q2 = new QueryOption("q2", "option2");
final BaseRequest request = new BaseRequest("https://a.b.c", null, Arrays.asList(q1, q2), null) {
};
assertEquals("https://a.b.c?q1=option1+&q2=option2", request.getRequestUrl().toString());
request.addQueryOption(new QueryOption("q3", "option3"));
assertEquals("https://a.b.c?q1=option1+&q2=option2&q3=option3", request.getRequestUrl().toString());
assertEquals(4, request.getOptions().size());
}
Aggregations