Search in sources :

Example 11 with MethodMetadata

use of feign.MethodMetadata in project feign by OpenFeign.

the class JAXRSContractTest method producesAndConsumesOnClassAddsHeader.

@Test
public void producesAndConsumesOnClassAddsHeader() throws Exception {
    MethodMetadata md = parseAndValidateMetadata(ProducesAndConsumes.class, "producesAndConsumes");
    assertThat(md.template()).hasHeaders(entry("Content-Type", asList("application/json")), entry("Accept", asList("text/html")));
}
Also used : MethodMetadata(feign.MethodMetadata) Test(org.junit.Test)

Aggregations

MethodMetadata (feign.MethodMetadata)11 Test (org.junit.Test)9 HystrixCommand (com.netflix.hystrix.HystrixCommand)1 Client (feign.Client)1 Contract (feign.Contract)1 Request (feign.Request)1 Response (feign.Response)1 HardCodedTarget (feign.Target.HardCodedTarget)1 IOException (java.io.IOException)1 ParameterizedType (java.lang.reflect.ParameterizedType)1 Type (java.lang.reflect.Type)1 Collection (java.util.Collection)1 LinkedHashMap (java.util.LinkedHashMap)1 List (java.util.List)1 Map (java.util.Map)1 Setup (org.openjdk.jmh.annotations.Setup)1 Observable (rx.Observable)1 Single (rx.Single)1