本文整理了Java中org.assertj.core.api.AbstractStringAssert.isIn()
方法的一些代码示例,展示了AbstractStringAssert.isIn()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractStringAssert.isIn()
方法的具体详情如下:
包路径:org.assertj.core.api.AbstractStringAssert
类名称:AbstractStringAssert
方法名:isIn
暂无
代码示例来源:origin: line/armeria
@Test(timeout = 10000)
public void testExceptionThrowingOnewayServiceAsync() throws Exception {
final OnewayHelloService.AsyncIface client =
Clients.newClient(clientFactory(), getURI(Handlers.EXCEPTION_ONEWAY),
Handlers.EXCEPTION_ONEWAY.asyncIface(), clientOptions);
final BlockingQueue<Object> resQueue = new LinkedBlockingQueue<>();
final String[] names = { "kukuman", "kukuman2" };
for (String name : names) {
client.hello(name, new RequestQueuingCallback(resQueue));
}
for (String ignored : names) {
assertThat(resQueue.take()).isEqualTo("null");
}
for (String ignored : names) {
assertThat(serverReceivedNames.take()).isIn(names);
}
}
代码示例来源:origin: line/armeria
@Test(timeout = 10000)
public void testOnewayHelloServiceAsync() throws Exception {
final OnewayHelloService.AsyncIface client =
Clients.newClient(clientFactory(), getURI(Handlers.ONEWAYHELLO),
Handlers.ONEWAYHELLO.asyncIface(), clientOptions);
final BlockingQueue<Object> resQueue = new LinkedBlockingQueue<>();
final String[] names = { "kukuman", "kukuman2" };
for (String name : names) {
client.hello(name, new RequestQueuingCallback(resQueue));
}
for (String ignored : names) {
assertThat(resQueue.take()).isEqualTo("null");
}
for (String ignored : names) {
assertThat(serverReceivedNames.take()).isIn(names);
}
}
代码示例来源:origin: line/armeria
@Test(timeout = 10000)
public void testDevNullServiceAsync() throws Exception {
final DevNullService.AsyncIface client =
Clients.newClient(clientFactory(), getURI(Handlers.DEVNULL),
Handlers.DEVNULL.asyncIface(), clientOptions);
final BlockingQueue<Object> resQueue = new LinkedBlockingQueue<>();
final String[] names = { "kukuman", "kukuman2" };
for (String name : names) {
client.consume(name, new RequestQueuingCallback(resQueue));
}
for (String ignored : names) {
assertThat(resQueue.take()).isEqualTo("null");
}
for (String ignored : names) {
assertThat(serverReceivedNames.take()).isIn(names);
}
}
代码示例来源:origin: palantir/atlasdb
@Test
public void shouldReturnNameWithMultipleTags() throws Exception {
String metricName = MetricNameUtils.getMetricName(METRIC_NAME,
ImmutableMap.of(TAG_KEY_2, TAG_VALUE_2, TAG_KEY_1, TAG_VALUE_1));
assertThat(metricName).isIn("metricName;tag1=tagVal1;tag2=tagVal2", "metricName;tag2=tagVal2;tag1=tagVal1");
}
代码示例来源:origin: spring-projects/spring-kafka
@Test
public void testContextNotLoaded() {
try {
new AnnotationConfigApplicationContext(BadConfig.class).close();
fail("Expected Exception");
}
catch (IllegalStateException e) {
assertThat(e.getMessage()).isIn("Could not create admin", "Could not configure topics");
}
}
代码示例来源:origin: spring-projects/spring-kafka
assertThat(receivedMessage.get()).isIn("baz", "qux");
assertThat(latch4.getCount()).isEqualTo(0L);
代码示例来源:origin: spring-projects/spring-integration-aws
org.springframework.messaging.Message<?> receive = this.inputChannel.receive(1000);
assertThat(receive).isNotNull();
assertThat((String) receive.getPayload()).isIn("messageContent", "messageContent2");
assertThat(receive.getHeaders().get(AwsHeaders.RECEIVED_QUEUE)).isEqualTo("testQueue");
receive = this.inputChannel.receive(1000);
assertThat(receive).isNotNull();
assertThat((String) receive.getPayload()).isIn("messageContent", "messageContent2");
assertThat(receive.getHeaders().get(AwsHeaders.RECEIVED_QUEUE)).isEqualTo("testQueue");
内容来源于网络,如有侵权,请联系作者删除!