@Test public void pathWithNoMatchHasNoFilters() throws Exception { FilterChainProxy filterChainProxy = appCtx.getBean( "newFilterChainProxyNoDefaultPath", FilterChainProxy.class); assertThat(filterChainProxy.getFilters("/nomatch")).isNull(); }
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(); }
@Test public void param_as_enums_returns_null_when_no_value() { assertThat(underTest.paramAsEnums("a_enum", RuleStatus.class)).isNull(); }
@Test public void no_filter_on_component_uuids_by_default() { assertThat(underTest.getMainComponentUuids()).isNull(); assertThat(underTest.isShortCircuitedByMainComponentUuids()).isFalse(); }
@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(); }
@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(); }
@Test public void findNoChildren() { ObjectIdentity objectIdentity = new ObjectIdentityImpl(MockLongIdDomainObject.class, 1L); List<ObjectIdentity> objectIdentities = aclService.findChildren(objectIdentity); assertThat(objectIdentities).isNull(); }
@Test public void findChildrenForUnknownObject() { ObjectIdentity objectIdentity = new ObjectIdentityImpl(Object.class, 33); List<ObjectIdentity> objectIdentities = aclServiceIntegration.findChildren(objectIdentity); assertThat(objectIdentities).isNull(); }
@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"); }
@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(); }
@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"); }
@Test public void createWithTypeAndKey_hasChildrenIsNull(){ //when AutocompleteCandidate aCandidate = new AutocompleteCandidate(1, "key"); //then Assertions.assertThat(aCandidate.getChildrens()).isNull(); }
@Test public void test_errorTypes() { assertThat(underTest.getErrorTypes()).isNull(); underTest.setErrorTypes(asList("foo", "bar")); assertThat(underTest.getErrorTypes()).containsExactlyInAnyOrder("foo", "bar"); }
@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"); }
@Test public void testNullList() { ao.insertUuidList(null); assertThat(ao.fetchUuidLinkedList()).isNull(); }
@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(); }
@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(); }
@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(); }
@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(); }