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

x33g5p2x  于2022-01-23 转载在 其他  
字(7.2k)|赞(0)|评价(0)|浏览(119)

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

ListAssert.isNull介绍

暂无

代码示例

代码示例来源:origin: spring-projects/spring-security

@Test
public void pathWithNoMatchHasNoFilters() throws Exception {
  FilterChainProxy filterChainProxy = appCtx.getBean(
      "newFilterChainProxyNoDefaultPath", FilterChainProxy.class);
  assertThat(filterChainProxy.getFilters("/nomatch")).isNull();
}

代码示例来源:origin: SonarSource/sonarqube

private void assertTlsAndClearTextSpecifications(HttpConnector underTest) {
 List<ConnectionSpec> connectionSpecs = underTest.okHttpClient().connectionSpecs();
 assertThat(connectionSpecs).hasSize(2);
 // TLS. tlsVersions()==null means all TLS versions
 assertThat(connectionSpecs.get(0).tlsVersions()).isNull();
 assertThat(connectionSpecs.get(0).isTls()).isTrue();
 // HTTP
 assertThat(connectionSpecs.get(1).tlsVersions()).isNull();
 assertThat(connectionSpecs.get(1).isTls()).isFalse();
}

代码示例来源:origin: SonarSource/sonarqube

@Test
public void param_as_enums_returns_null_when_no_value() {
 assertThat(underTest.paramAsEnums("a_enum", RuleStatus.class)).isNull();
}

代码示例来源:origin: SonarSource/sonarqube

@Test
public void no_filter_on_component_uuids_by_default() {
 assertThat(underTest.getMainComponentUuids()).isNull();
 assertThat(underTest.isShortCircuitedByMainComponentUuids()).isFalse();
}

代码示例来源:origin: twosigma/beakerx

@Test
public void createConstantBandByEmptyConstructor_hasXsAndYsListsAreNulls() {
 //when
 ConstantBand constantBand = new ConstantBand();
 //then
 Assertions.assertThat(constantBand.getX()).isNull();
 Assertions.assertThat(constantBand.getY()).isNull();
}

代码示例来源:origin: reactor/reactor-core

@Test
public void scanOperatorNullTags() throws Exception {
  Mono<Integer> source = Mono.just(1);
  MonoName<Integer> test = new MonoName<>(source, "foo", null);
  assertThat(test.scan(Scannable.Attr.TAGS)).isNull();
}

代码示例来源:origin: reactor/reactor-core

@Test
public void scanOperatorNullTags() throws Exception {
  Mono<Integer> source = Mono.just(1);
  MonoNameFuseable<Integer> test = new MonoNameFuseable<>(source, "foo", null);
  assertThat(test.scan(Scannable.Attr.TAGS)).isNull();
}

代码示例来源:origin: spring-projects/spring-security

@Test
public void findNoChildren() {
  ObjectIdentity objectIdentity = new ObjectIdentityImpl(MockLongIdDomainObject.class, 1L);
  List<ObjectIdentity> objectIdentities = aclService.findChildren(objectIdentity);
  assertThat(objectIdentities).isNull();
}

代码示例来源:origin: spring-projects/spring-security

@Test
public void findChildrenForUnknownObject() {
  ObjectIdentity objectIdentity = new ObjectIdentityImpl(Object.class, 33);
  List<ObjectIdentity> objectIdentities = aclServiceIntegration.findChildren(objectIdentity);
  assertThat(objectIdentities).isNull();
}

代码示例来源:origin: springside/springside4

@Test
public void split() {
  List<String> result = MoreStringUtil.split("192.168.0.1", '.', 4);
  assertThat(result).hasSize(4).containsSequence("192", "168", "0", "1");
  result = MoreStringUtil.split("192.168..1", '.', 4);
  assertThat(result).hasSize(3).containsSequence("192", "168", "1");
  result = MoreStringUtil.split("192.168.0.", '.', 4);
  assertThat(result).hasSize(3).containsSequence("192", "168", "0");
  assertThat(MoreStringUtil.split(null, '.', 4)).isNull();
  assertThat(MoreStringUtil.split("", '.', 4)).hasSize(0);
  Splitter splitter =MoreStringUtil.charsSplitter("/\\").omitEmptyStrings();
  result = splitter.splitToList("/a/b/c");
  assertThat(result).hasSize(3).containsSequence("a", "b", "c");
  result =  splitter.splitToList("\\a\\b\\c");
  assertThat(result).hasSize(3).containsSequence( "a", "b", "c");
}

代码示例来源:origin: twosigma/beakerx

@Test
public void createBarsByEmptyConstructor_hasWidthAndColorValuesAreNulls() {
 //then
 Assertions.assertThat(bars.getWidth()).isNull();
 Assertions.assertThat(bars.getWidths()).isNull();
 Assertions.assertThat(bars.getOutlineColor()).isNull();
 Assertions.assertThat(bars.getOutlineColors()).isNull();
}

代码示例来源:origin: SonarSource/sonarqube

@Test
public void param_as_strings() {
 assertThat(underTest.paramAsStrings("a_string")).isNull();
 assertThat(underTest.setParam("a_string", "").paramAsStrings("a_string")).isEmpty();
 assertThat(underTest.setParam("a_string", "bar").paramAsStrings("a_string")).containsExactly("bar");
 assertThat(underTest.setParam("a_string", "bar,baz").paramAsStrings("a_string")).containsExactly("bar", "baz");
 assertThat(underTest.setParam("a_string", "bar , baz").paramAsStrings("a_string")).containsExactly("bar", "baz");
}

代码示例来源:origin: twosigma/beakerx

@Test
public void createWithTypeAndKey_hasChildrenIsNull(){
 //when
 AutocompleteCandidate aCandidate = new AutocompleteCandidate(1, "key");
 //then
 Assertions.assertThat(aCandidate.getChildrens()).isNull();
}

代码示例来源:origin: SonarSource/sonarqube

@Test
public void test_errorTypes() {
 assertThat(underTest.getErrorTypes()).isNull();
 underTest.setErrorTypes(asList("foo", "bar"));
 assertThat(underTest.getErrorTypes()).containsExactlyInAnyOrder("foo", "bar");
}

代码示例来源:origin: SonarSource/sonarqube

@Test
public void toStrings() {
 assertThat(RubyUtils.toStrings(null)).isNull();
 assertThat(RubyUtils.toStrings("")).isEmpty();
 assertThat(RubyUtils.toStrings("foo")).containsOnly("foo");
 assertThat(RubyUtils.toStrings("foo,bar")).containsOnly("foo", "bar");
 assertThat(RubyUtils.toStrings(asList("foo", "bar"))).containsOnly("foo", "bar");
}

代码示例来源:origin: jdbi/jdbi

@Test
public void testNullList() {
  ao.insertUuidList(null);
  assertThat(ao.fetchUuidLinkedList()).isNull();
}

代码示例来源:origin: reactor/reactor-core

@Test
public void scanOperatorNullTags() throws Exception {
  Flux<Integer> source = Flux.range(1, 4);
  FluxNameFuseable<Integer> test = new FluxNameFuseable<>(source, "foo", null);
  assertThat(test.scan(Scannable.Attr.TAGS)).isNull();
}

代码示例来源:origin: twosigma/beakerx

@Test
public void createWithMaxNumKeysIsTwo_hasOneElementOfChildrens(){
 //when
 AutocompleteCandidate aCandidate = new AutocompleteCandidate(1, keys, 2);
 //then
 Assertions.assertThat(aCandidate.getChildrens()).isNotEmpty();
 AutocompleteCandidate child = aCandidate.getChildrens().get(0);
 Assertions.assertThat(child.getChildrens()).isNull();
}

代码示例来源:origin: reactor/reactor-core

@Test
public void scanOperatorNullTags() throws Exception {
  Flux<Integer> source = Flux.range(1, 4);
  FluxName<Integer> test = new FluxName<>(source, "foo", null);
  assertThat(test.scan(Scannable.Attr.TAGS)).isNull();
}

代码示例来源:origin: reactor/reactor-core

@Test
public void scanOperatorNullTags() throws Exception {
  ParallelFlux<Integer> source = Flux.range(1, 4).parallel(3);
  ParallelFluxName<Integer> test = new ParallelFluxName<>(source, "foo", null);
  assertThat(test.scan(Scannable.Attr.TAGS)).isNull();
}

相关文章

微信公众号

最新文章

更多

ListAssert类方法