Package feign

Examples of feign.MethodMetadata.urlIndex()


    assertEquals(md.template().url(), "");
    assertTrue(md.template().queries().isEmpty());
    assertTrue(md.template().headers().isEmpty());
    assertNull(md.template().body());
    assertNull(md.template().bodyTemplate());
    assertEquals(md.urlIndex(), Integer.valueOf(0));
  }

  interface WithQueryParamsInPath {
    @GET @Path("/") Response none();
View Full Code Here


  @Test public void bodyParamIsGeneric() throws Exception {
    MethodMetadata md = contract.parseAndValidatateMetadata(BodyParams.class.getDeclaredMethod("post",
        List.class));
    assertNull(md.template().body());
    assertNull(md.template().bodyTemplate());
    assertNull(md.urlIndex());
    assertEquals(md.bodyIndex(), Integer.valueOf(0));
    assertEquals(md.bodyType(), new TypeToken<List<String>>() {
    }.getType());
  }
View Full Code Here

  }

  @Test public void methodCanHaveUriParam() throws Exception {
    MethodMetadata md = contract.parseAndValidatateMetadata(WithURIParam.class.getDeclaredMethod("uriParam", String.class,
        URI.class, String.class));
    assertEquals(md.urlIndex(), Integer.valueOf(1));
  }

  @Test public void pathParamsParseIntoIndexToName() throws Exception {
    MethodMetadata md = contract.parseAndValidatateMetadata(WithURIParam.class.getDeclaredMethod("uriParam", String.class,
        URI.class, String.class));
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.