Examples of uri()


Examples of com.gistlabs.mechanize.document.json.hypermedia.JsonLink.uri()

  @Test
  public void setVariableProgramatically() {
    JsonNode node = json.find("trivial-template");
    JsonLink link = new JsonLink(node);
    link.set("a", "aaa");
    assertEquals("http://example.com/aaa", link.uri());
  }
 
  @Test
  public void setAllVariableProgramatically() {
    JsonNode node = json.find("template-path-segments");
View Full Code Here

Examples of com.jcabi.http.Request.uri()

            .path("/pulls")
            .path(String.valueOf(number))
            .path("/comments")
            .back();
        return new RtPagination<PullComment>(
            newreq.uri().queryParams(params).back(),
            new RtPagination.Mapping<PullComment, JsonObject>() {
                @Override
                public PullComment map(final JsonObject value) {
                    return RtPullComments.this.get(
                        value.getInt("id")
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery.uri()

        );
        try {
            keys.remove(1);
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.uri().toString(),
                Matchers.endsWith("/user/keys/1")
            );
            MatcherAssert.assertThat(
                query.method(),
                Matchers.equalTo(Request.DELETE)
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery.uri()

                keys.create("theTitle", "theKey").number(),
                Matchers.is(1)
            );
            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.uri().toString(),
                Matchers.endsWith("/user/keys")
            );
            MatcherAssert.assertThat(
                query.body(),
                Matchers.equalTo(
View Full Code Here

Examples of com.jcabi.http.mock.MkQuery.uri()

            final MkQuery query = container.take();
            MatcherAssert.assertThat(
                query.method(), Matchers.equalTo(Request.DELETE)
            );
            MatcherAssert.assertThat(
                query.uri().toString(),
                Matchers.endsWith("/repos/johnny/test/pulls/comments/2")
            );
        } finally {
            container.stop();
        }
View Full Code Here

Examples of com.sissi.io.read.Metadata.uri()

  public XMLMapping() {
    super();
    for (Class<?> each : ScanUtil.getClasses(this.loading)) {
      Metadata metadata = each.getAnnotation(Metadata.class);
      if (metadata != null) {
        this.selector.install(metadata.uri(), metadata.localName(), each);
      }
    }
  }

  public Object instance(String uri, String localName) {
View Full Code Here

Examples of com.strategicgains.restexpress.RestExpress.uri()

    RestExpress server = new RestExpress()
      .setName("RestExpress Benchmark")
        .setExecutorThreadCount(config.getExecutorThreadPoolSize())
        .alias("HelloWorld", HelloWorld.class);

    server.uri("/restexpress/json", config.getJsonController())
      .action("helloWorld", HttpMethod.GET);

    server.uri("/restexpress/mysql", config.getMysqlController())
      .method(HttpMethod.GET);
View Full Code Here

Examples of com.strategicgains.restexpress.RestExpress.uri()

        .alias("HelloWorld", HelloWorld.class);

    server.uri("/restexpress/json", config.getJsonController())
      .action("helloWorld", HttpMethod.GET);

    server.uri("/restexpress/mysql", config.getMysqlController())
      .method(HttpMethod.GET);

    server.uri("/restexpress/mongodb", config.getMongodbController())
        .method(HttpMethod.GET);
View Full Code Here

Examples of com.strategicgains.restexpress.RestExpress.uri()

      .action("helloWorld", HttpMethod.GET);

    server.uri("/restexpress/mysql", config.getMysqlController())
      .method(HttpMethod.GET);

    server.uri("/restexpress/mongodb", config.getMongodbController())
        .method(HttpMethod.GET);

    server.bind(config.getPort());
    server.awaitShutdown();
  }
View Full Code Here

Examples of com.sun.jersey.api.client.WebResource.uri()

        ClientResponse createResponse = webResource.path("/").type(MediaType.APPLICATION_JSON).entity(testResource).post(ClientResponse.class);

        Assert.assertEquals(201, createResponse.getStatus());
        Assert.assertEquals(testResource, createResponse.getEntity(JsonNode.class));

        JsonNode testResourceFromServer = webResource.uri(createResponse.getLocation()).accept(MediaType.APPLICATION_JSON).get(JsonNode.class);
        Assert.assertEquals(testResource, testResourceFromServer);
    }


}
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.