org.assertj.core.api.AbstractListAssert.isNullOrEmpty()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(68)

本文整理了Java中org.assertj.core.api.AbstractListAssert.isNullOrEmpty()方法的一些代码示例,展示了AbstractListAssert.isNullOrEmpty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractListAssert.isNullOrEmpty()方法的具体详情如下:
包路径:org.assertj.core.api.AbstractListAssert
类名称:AbstractListAssert
方法名:isNullOrEmpty

AbstractListAssert.isNullOrEmpty介绍

暂无

代码示例

代码示例来源:origin: ubiratansoares/rxassertions

TestSubscriberAssertionsWrapper<T> notCompletes() {
  assertThat(onCompletedEvents).isNullOrEmpty();
  return this;
}

代码示例来源:origin: Nike-Inc/wingtips

@Test
public void addTracingInterceptors_single_arg_works_as_expected() {
  // given
  HttpClientBuilder builder = HttpClientBuilder.create();
  // when
  addTracingInterceptors(builder);
  // then
  HttpClientBuilderInterceptors builderInterceptors = new HttpClientBuilderInterceptors(builder);
  assertThat(builderInterceptors.firstRequestInterceptors).containsExactly(DEFAULT_REQUEST_IMPL);
  assertThat(builderInterceptors.lastRequestInterceptors).isNullOrEmpty();
  assertThat(builderInterceptors.firstResponseInterceptors).isNullOrEmpty();
  assertThat(builderInterceptors.lastResponseInterceptors).containsExactly(DEFAULT_RESPONSE_IMPL);
}

代码示例来源:origin: Nike-Inc/wingtips

@DataProvider(value = {
  "true",
  "false"
})
@Test
public void addTracingInterceptors_double_arg_works_as_expected(boolean subspanOptionOn) {
  // given
  HttpClientBuilder builder = HttpClientBuilder.create();
  // when
  addTracingInterceptors(builder, subspanOptionOn);
  // then
  HttpClientBuilderInterceptors builderInterceptors = new HttpClientBuilderInterceptors(builder);
  assertThat(builderInterceptors.firstRequestInterceptors).hasSize(1);
  assertThat(builderInterceptors.lastResponseInterceptors).hasSize(1);
  HttpRequestInterceptor requestInterceptor = builderInterceptors.firstRequestInterceptors.get(0);
  HttpResponseInterceptor responseInterceptor = builderInterceptors.lastResponseInterceptors.get(0);
  assertThat(requestInterceptor).isInstanceOf(WingtipsApacheHttpClientInterceptor.class);
  assertThat(responseInterceptor).isInstanceOf(WingtipsApacheHttpClientInterceptor.class);
  assertThat(((WingtipsApacheHttpClientInterceptor) requestInterceptor).surroundCallsWithSubspan)
    .isEqualTo(subspanOptionOn);
  assertThat(((WingtipsApacheHttpClientInterceptor) responseInterceptor).surroundCallsWithSubspan)
    .isEqualTo(subspanOptionOn);
  assertThat(builderInterceptors.lastRequestInterceptors).isNullOrEmpty();
  assertThat(builderInterceptors.firstResponseInterceptors).isNullOrEmpty();
  if (subspanOptionOn) {
    assertThat(builderInterceptors.firstRequestInterceptors).containsExactly(DEFAULT_REQUEST_IMPL);
    assertThat(builderInterceptors.lastResponseInterceptors).containsExactly(DEFAULT_RESPONSE_IMPL);
  }
}

代码示例来源:origin: Nike-Inc/wingtips

assertThat(deserializedAnnotations).isNullOrEmpty();

相关文章

微信公众号

最新文章

更多