Package com.linkedin.restli.examples.greetings.client

Examples of com.linkedin.restli.examples.greetings.client.ExceptionsRequestBuilders


  @DataProvider
  private static Object[][] requestBuilderDataProvider()
  {
    return new Object[][] {
      { new RootBuilderWrapper<Long, Greeting>(new ExceptionsBuilders()) },
      { new RootBuilderWrapper<Long, Greeting>(new ExceptionsRequestBuilders()) }
    };
  }
View Full Code Here


  }

  @Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestOptionsDataProvider")
  public void testBatchCreateIdErrors(RestliRequestOptions requestOptions) throws Exception
  {
    ExceptionsRequestBuilders builders = new ExceptionsRequestBuilders(requestOptions);

    BatchCreateIdRequest<Long, Greeting> batchCreateRequest = builders.batchCreate()
      .input(new Greeting().setId(10L).setMessage("Greetings.").setTone(Tone.SINCERE))
      .input(new Greeting().setId(11L).setMessage("@#$%@!$%").setTone(Tone.INSULTING))
      .build();

    Response<BatchCreateIdResponse<Long>> response = REST_CLIENT.sendRequest(batchCreateRequest).getResponse();
View Full Code Here

  public Object[][] exceptionHandlingModesDataProvider()
  {
    return new Object[][] {
      { true, ErrorHandlingBehavior.FAIL_ON_ERROR, new RootBuilderWrapper<Long, Greeting>(new ExceptionsBuilders()) },
      { true, ErrorHandlingBehavior.FAIL_ON_ERROR, new RootBuilderWrapper<Long, Greeting>(new ExceptionsBuilders(TestConstants.FORCE_USE_NEXT_OPTIONS)) },
      { true, ErrorHandlingBehavior.FAIL_ON_ERROR, new RootBuilderWrapper<Long, Greeting>(new ExceptionsRequestBuilders()) },
      { true, ErrorHandlingBehavior.FAIL_ON_ERROR, new RootBuilderWrapper<Long, Greeting>(new ExceptionsRequestBuilders(TestConstants.FORCE_USE_NEXT_OPTIONS)) },
      { true, ErrorHandlingBehavior.TREAT_SERVER_ERROR_AS_SUCCESS, new RootBuilderWrapper<Long, Greeting>(new ExceptionsBuilders()) },
      { true, ErrorHandlingBehavior.TREAT_SERVER_ERROR_AS_SUCCESS, new RootBuilderWrapper<Long, Greeting>(new ExceptionsBuilders(TestConstants.FORCE_USE_NEXT_OPTIONS)) },
      { true, ErrorHandlingBehavior.TREAT_SERVER_ERROR_AS_SUCCESS, new RootBuilderWrapper<Long, Greeting>(new ExceptionsRequestBuilders()) },
      { true, ErrorHandlingBehavior.TREAT_SERVER_ERROR_AS_SUCCESS, new RootBuilderWrapper<Long, Greeting>(new ExceptionsRequestBuilders(TestConstants.FORCE_USE_NEXT_OPTIONS)) },
      { false, null, new RootBuilderWrapper<Long, Greeting>(new ExceptionsBuilders()) },
      { false, null, new RootBuilderWrapper<Long, Greeting>(new ExceptionsBuilders(TestConstants.FORCE_USE_NEXT_OPTIONS)) },
      { false, null, new RootBuilderWrapper<Long, Greeting>(new ExceptionsRequestBuilders()) },
      { false, null, new RootBuilderWrapper<Long, Greeting>(new ExceptionsRequestBuilders(TestConstants.FORCE_USE_NEXT_OPTIONS)) }
    };
  }
View Full Code Here

TOP

Related Classes of com.linkedin.restli.examples.greetings.client.ExceptionsRequestBuilders

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.