本文整理汇总了Java中feign.Target.EmptyTarget类的典型用法代码示例。如果您正苦于以下问题:Java EmptyTarget类的具体用法?Java EmptyTarget怎么用?Java EmptyTarget使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EmptyTarget类属于feign.Target包,在下文中一共展示了EmptyTarget类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: mustApplyToAbsoluteUrl
import feign.Target.EmptyTarget; //导入依赖的package包/类
@Test
public void mustApplyToAbsoluteUrl() {
thrown.expect(UnsupportedOperationException.class);
thrown.expectMessage("Request with non-absolute URL not supported with empty target");
EmptyTarget.create(UriInterface.class)
.apply(new RequestTemplate().method("GET").append("/relative"));
}
示例2: whenNameNotSupplied
import feign.Target.EmptyTarget; //导入依赖的package包/类
@Test
public void whenNameNotSupplied() {
assertThat(EmptyTarget.create(UriInterface.class))
.isEqualTo(EmptyTarget.create(UriInterface.class, "empty:UriInterface"));
}
示例3: toString_withoutName
import feign.Target.EmptyTarget; //导入依赖的package包/类
@Test
public void toString_withoutName() {
assertThat(EmptyTarget.create(UriInterface.class).toString())
.isEqualTo("EmptyTarget(type=UriInterface)");
}
示例4: toString_withName
import feign.Target.EmptyTarget; //导入依赖的package包/类
@Test
public void toString_withName() {
assertThat(EmptyTarget.create(UriInterface.class, "manager-access").toString())
.isEqualTo("EmptyTarget(type=UriInterface, name=manager-access)");
}
示例5: cloudIdentity
import feign.Target.EmptyTarget; //导入依赖的package包/类
@Provides
@Singleton
CloudIdentity cloudIdentity(Feign feign) {
return feign.newInstance(EmptyTarget.create(CloudIdentity.class, "cloudidentity"));
}
示例6: keystoneV2
import feign.Target.EmptyTarget; //导入依赖的package包/类
@Provides
@Singleton
KeystoneV2 keystoneV2(Feign feign) {
return feign.newInstance(EmptyTarget.create(KeystoneV2.class, "keystone"));
}