Search in sources :

Example 6 with FunctionOption

use of com.microsoft.graph.options.FunctionOption in project msgraph-sdk-java by microsoftgraph.

the class BaseRequestTests method testProtectedProperties.

@Test
public void testProtectedProperties() {
    assertEquals(0, request.functionOptions.size());
    assertEquals(0, request.queryOptions.size());
    final Option q1 = new QueryOption("q1", "option1 ");
    final Option f1 = new FunctionOption("f1", "option2");
    final BaseRequest request = new BaseRequest("https://a.b.c", null, Arrays.asList(q1, f1), null) {
    };
    assertEquals(1, request.functionOptions.size());
    assertEquals(1, request.queryOptions.size());
    assertEquals("q1", request.queryOptions.get(0).getName());
    assertEquals("option1 ", request.queryOptions.get(0).getValue());
    assertEquals("f1", request.functionOptions.get(0).getName());
    assertEquals("option2", request.functionOptions.get(0).getValue());
}
Also used : FunctionOption(com.microsoft.graph.options.FunctionOption) QueryOption(com.microsoft.graph.options.QueryOption) QueryOption(com.microsoft.graph.options.QueryOption) Option(com.microsoft.graph.options.Option) FunctionOption(com.microsoft.graph.options.FunctionOption) HeaderOption(com.microsoft.graph.options.HeaderOption) Test(org.junit.Test)

Aggregations

FunctionOption (com.microsoft.graph.options.FunctionOption)6 Option (com.microsoft.graph.options.Option)5 QueryOption (com.microsoft.graph.options.QueryOption)5 Test (org.junit.Test)5 HeaderOption (com.microsoft.graph.options.HeaderOption)3