Package com.linkedin.restli.server.custom.types

Examples of com.linkedin.restli.server.custom.types.CustomString


  public void testCustomTypeParametersCustomString(ProtocolVersion version, String uri) throws Exception
  {
    ResourceModel repliesResourceModel = buildResourceModel(RepliesCollectionResource.class);
    ResourceMethodDescriptor methodDescriptor = repliesResourceModel.findNamedMethod("customString");
    RepliesCollectionResource repliesResource =  getMockResource(RepliesCollectionResource.class);
    repliesResource.customString(new CustomString("foo"));
    EasyMock.expectLastCall().andReturn(null).once();
    checkInvocation(repliesResource, methodDescriptor, "GET", version, uri);
  }
View Full Code Here


  }

  @Test
  public void testConvertCustomString()
  {
    CustomString forceRegistration = new CustomString("");

    Class<?> customStringClass = CustomString.class;
    Object convertedCustomString = ArgumentUtils.convertSimpleValue("aString",
                                                                  DataTemplateUtil.getSchema(CustomStringRef.class),
                                                                  customStringClass
    );

    Assert.assertTrue(convertedCustomString.getClass().equals(customStringClass));
    CustomString customString = (CustomString) convertedCustomString;
    Assert.assertTrue(customString.toString().equals("aString"));

  }
View Full Code Here

TOP

Related Classes of com.linkedin.restli.server.custom.types.CustomString

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.