Search in sources :

Example 1 with ConjureRuntime

use of com.palantir.dialogue.ConjureRuntime in project conjure-java-runtime by palantir.

the class JaxrsClientValidationTest method testNonJaxrs.

@Test
public void testNonJaxrs() {
    ConjureRuntime runtime = mock(ConjureRuntime.class);
    Channel channel = mock(Channel.class);
    assertThatThrownBy(() -> JaxRsClient.create(NotJaxRs.class, channel, runtime)).isInstanceOf(IllegalStateException.class).hasMessageContaining("Method getValue not annotated with HTTP method type");
}
Also used : ConjureRuntime(com.palantir.dialogue.ConjureRuntime) Channel(com.palantir.dialogue.Channel) Test(org.junit.Test)

Example 2 with ConjureRuntime

use of com.palantir.dialogue.ConjureRuntime in project dialogue by palantir.

the class ReloadingClientFactory method get.

@Override
public <T> T get(Class<T> serviceClass, String serviceName) {
    Channel channel = getChannel(serviceName);
    ConjureRuntime runtime = params.runtime();
    return Reflection.callStaticFactoryMethod(serviceClass, channel, runtime);
}
Also used : ConjureRuntime(com.palantir.dialogue.ConjureRuntime) DefaultConjureRuntime(com.palantir.conjure.java.dialogue.serde.DefaultConjureRuntime) Channel(com.palantir.dialogue.Channel) EndpointChannel(com.palantir.dialogue.EndpointChannel) DialogueChannel(com.palantir.dialogue.core.DialogueChannel)

Aggregations

Channel (com.palantir.dialogue.Channel)2 ConjureRuntime (com.palantir.dialogue.ConjureRuntime)2 DefaultConjureRuntime (com.palantir.conjure.java.dialogue.serde.DefaultConjureRuntime)1 EndpointChannel (com.palantir.dialogue.EndpointChannel)1 DialogueChannel (com.palantir.dialogue.core.DialogueChannel)1 Test (org.junit.Test)1