Search in sources :

Example 16 with GreetingsRequestBuilders

use of com.linkedin.restli.examples.greetings.client.GreetingsRequestBuilders in project rest.li by linkedin.

the class TestRootBuilderWrapper method testWrapperMethodNameGeneration.

@Test
public void testWrapperMethodNameGeneration() {
    RootBuilderWrapper<Long, Greeting> rootBuilderWrapper1 = new RootBuilderWrapper<>(new GreetingsBuilders());
    RootBuilderWrapper<Long, Greeting> rootBuilderWrapper2 = new RootBuilderWrapper<>(new GreetingsRequestBuilders());
    rootBuilderWrapper1.findBy("searchWithTones").addQueryParam("tones", Tone.FRIENDLY);
    rootBuilderWrapper1.findBy("searchWithTones").setParam("Tones", new Tone[3]);
    rootBuilderWrapper1.findBy("SearchWithTones").addQueryParam("Tones", Tone.FRIENDLY);
    rootBuilderWrapper1.findBy("SearchWithTones").setParam("tones", new Tone[3]);
    rootBuilderWrapper1.action("someAction").setParam("a", 5);
    rootBuilderWrapper2.action("someAction").setParam("a", 5);
    rootBuilderWrapper1.action("SomeAction").setParam("A", 5);
    rootBuilderWrapper2.action("SomeAction").setParam("A", 5);
}
Also used : GreetingsBuilders(com.linkedin.restli.examples.greetings.client.GreetingsBuilders) Greeting(com.linkedin.restli.examples.greetings.api.Greeting) GreetingsRequestBuilders(com.linkedin.restli.examples.greetings.client.GreetingsRequestBuilders) Test(org.testng.annotations.Test)

Aggregations

GreetingsRequestBuilders (com.linkedin.restli.examples.greetings.client.GreetingsRequestBuilders)16 Greeting (com.linkedin.restli.examples.greetings.api.Greeting)14 Test (org.testng.annotations.Test)11 BatchKVResponse (com.linkedin.restli.client.response.BatchKVResponse)4 BatchCreateIdResponse (com.linkedin.restli.common.BatchCreateIdResponse)4 RestLiIntegrationTest (com.linkedin.restli.examples.RestLiIntegrationTest)4 CreateIdStatus (com.linkedin.restli.common.CreateIdStatus)3 IdResponse (com.linkedin.restli.common.IdResponse)3 GreetingsBuilders (com.linkedin.restli.examples.greetings.client.GreetingsBuilders)3 NamedDataSchema (com.linkedin.data.schema.NamedDataSchema)2 RestClient (com.linkedin.restli.client.RestClient)2 EntityResponse (com.linkedin.restli.common.EntityResponse)2 OptionsResponse (com.linkedin.restli.common.OptionsResponse)2 HashMap (java.util.HashMap)2 FutureCallback (com.linkedin.common.callback.FutureCallback)1 None (com.linkedin.common.util.None)1 DataMap (com.linkedin.data.DataMap)1 DataSchemaResolver (com.linkedin.data.schema.DataSchemaResolver)1 RemoteInvocationException (com.linkedin.r2.RemoteInvocationException)1 CompressionConfig (com.linkedin.r2.filter.CompressionConfig)1