Package com.linkedin.data.template

Examples of com.linkedin.data.template.LongArray


  @Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestBuilderDataProvider")
  public void testGet(RootBuilderWrapper<ComplexResourceKey<ComplexArray, ComplexArray>, Greeting> builders) throws RemoteInvocationException, CloneNotSupportedException
  {
    // all array are singletons with single element
    LongArray singleton = new LongArray();
    singleton.add(1L);

    ComplexArray next = new ComplexArray().setArray(singleton);
    ComplexArray key = new ComplexArray().setArray(singleton).setNext(next);
    ComplexArray params = new ComplexArray().setArray(singleton).setNext(next);
    ComplexResourceKey<ComplexArray, ComplexArray> complexKey = new ComplexResourceKey<ComplexArray, ComplexArray>(key, params);
View Full Code Here


  }

  @Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestBuilderDataProvider")
  public void testFinder(RootBuilderWrapper<ComplexResourceKey<ComplexArray, ComplexArray>, Greeting> builders) throws RemoteInvocationException
  {
    LongArray singleton = new LongArray();
    singleton.add(1L);
    ComplexArray next = new ComplexArray().setArray(singleton);
    ComplexArray array = new ComplexArray().setArray(singleton).setNext(next);

    Request<CollectionResponse<Greeting>> request = builders.findBy("Finder").setQueryParam("array", array).build();
    REST_CLIENT.sendRequest(request).getResponse().getEntity();
View Full Code Here

  }

  @Test(dataProvider = com.linkedin.restli.internal.common.TestConstants.RESTLI_PROTOCOL_1_2_PREFIX + "requestBuilderDataProvider")
  public void testAction(RootBuilderWrapper<ComplexResourceKey<ComplexArray, ComplexArray>, Greeting> builders) throws RemoteInvocationException
  {
    LongArray singleton = new LongArray();
    singleton.add(1L);
    ComplexArray next = new ComplexArray().setArray(singleton);
    ComplexArray array = new ComplexArray().setArray(singleton).setNext(next);

    Request<Integer> request = builders.<Integer>action("Action").setActionParam("Array", array).build();
    REST_CLIENT.sendRequest(request).getResponse().getEntity();
View Full Code Here

    REST_CLIENT.sendRequest(request).getResponse().getEntity();
  }

  private static List<ComplexResourceKey<ComplexArray, ComplexArray>> getBatchCompleKeys()
  {
    LongArray singleton1 = new LongArray();
    singleton1.add(1L);
    ComplexArray next1 = new ComplexArray().setArray(singleton1);
    ComplexArray key1 = new ComplexArray().setArray(singleton1).setNext(next1);
    ComplexArray params1 = new ComplexArray().setArray(singleton1).setNext(next1);
    ComplexResourceKey<ComplexArray, ComplexArray> complexKey1 =
      new ComplexResourceKey<ComplexArray, ComplexArray>(key1, params1);

    LongArray singleton2 = new LongArray();
    singleton2.add(2L);
    ComplexArray next2 = new ComplexArray().setArray(singleton2);
    ComplexArray key2 = new ComplexArray().setArray(singleton2).setNext(next2);
    ComplexArray params2 = new ComplexArray().setArray(singleton2).setNext(next2);
    ComplexResourceKey<ComplexArray, ComplexArray> complexKey2 =
      new ComplexResourceKey<ComplexArray, ComplexArray>(key2, params2);
View Full Code Here

    result = test("[1.1, 2.2, 3.3]", IntegerArray.class);
    Assert.assertEquals(result, new IntegerArray(Arrays.asList(1, 2, 3)));
    Assert.assertSame(result.getClass(), IntegerArray.class);

    result = test("[2, 3, 4]", LongArray.class);
    Assert.assertEquals(result, new LongArray(Arrays.asList(2L, 3L, 4L)));
    Assert.assertSame(result.getClass(), LongArray.class);

    result = test("[1.1, 2.2, 3.3]", FloatArray.class);
    Assert.assertEquals(result, new FloatArray(Arrays.asList(1.1F, 2.2F, 3.3F)));
    Assert.assertSame(result.getClass(), FloatArray.class);
View Full Code Here

TOP

Related Classes of com.linkedin.data.template.LongArray

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.