Examples of PathKeys


Examples of com.linkedin.restli.server.PathKeys

    // #1 simple GET
    request = createRequest(uri, "GET", version);

    result = _router.process(request, new RequestContext());
    assertNotNull(result);
    PathKeys keys = result.getContext().getPathKeys();
    assertEquals(keys.getAsString("testId"), "foo");
    assertEquals(keys.getAsString("subId"), "bar");
  }
View Full Code Here

Examples of com.linkedin.restli.server.PathKeys

public class ComplexKeysSubResource extends CollectionResourceTemplate<String, TwoPartKey>
{
  @RestMethod.Get
  public TwoPartKey get(String key)
  {
    PathKeys pathKeys = getContext().getPathKeys();
    ComplexResourceKey<TwoPartKey, TwoPartKey> keys = pathKeys.get("keys");
    return convert(keys);
  }
View Full Code Here

Examples of com.linkedin.restli.server.PathKeys

    Capture<String> param4Capture = new Capture<String>();
    Capture<String> param5Capture = new Capture<String>();
    Capture<String> param6Capture = new Capture<String>();

    ResourceContext mockResourceContext = EasyMock.createMock(ResourceContext.class);
    PathKeys mockPathKeys = EasyMock.createMock(PathKeys.class);

    //easy mock for processing param1
    EasyMock.expect(mockPathKeys.get(EasyMock.capture(param1Capture))).andReturn(param1Value);
    EasyMock.expect(mockResourceContext.getPathKeys()).andReturn(mockPathKeys);
    //easy mock for processing param2
    EasyMock.expect(mockResourceContext.getParameter(EasyMock.capture(param2Capture))).andReturn(param2Value);
    //easy mock for processing param3
    EasyMock.expect(mockResourceContext.getStructuredParameter(EasyMock.capture(param3Capture))).andReturn(param3Value);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.