@Test public void testTextWithoutClickableSpans() { TextDrawable drawable = getMountedDrawableForText("Some text."); assertThat(drawable.getClickableSpans()).isNull(); }
@Test(groups = "unit") public void should_not_serialize_raw_query_values() { RegularStatement select = select().from("test").where(gt("i", raw("1"))); assertThat(select.getQueryString()).doesNotContain("?"); assertThat(select.getValues(ProtocolVersion.NEWEST_SUPPORTED, CodecRegistry.DEFAULT_INSTANCE)) .isNull(); }
@Test public void testGetStringAttributesNotExists() throws Exception { String s[] = tested.getStringAttributes("abc"); assertThat(s).isNull(); }
@Test public void testUsingProvidedPath() { final URI newRepo = URI.create("git://repo-name"); JGitFileSystemProxy fileSystem = (JGitFileSystemProxy) provider.newFileSystem(newRepo, EMPTY_ENV); //no infra created due to lazy loading nature of our FS String[] names = tempDir.list(); assertThat(names).isEmpty(); String[] repos = new File(tempDir, dirPathName).list(); assertThat(repos).isNull(); //FS created fileSystem.getRealJGitFileSystem(); names = tempDir.list(); assertThat(names).contains(dirPathName); repos = new File(tempDir, dirPathName).list(); assertThat(repos).contains("repo-name.git"); } }
@Test public void testUsingProvidedPath() { final URI newRepo = URI.create("git://repo-name"); JGitFileSystemProxy fileSystem = (JGitFileSystemProxy) provider.newFileSystem(newRepo, EMPTY_ENV); //no infra created due to lazy loading nature of our FS String[] names = tempDir.list(); assertThat(names).isEmpty(); String[] repos = new File(tempDir, dirPathName).list(); assertThat(repos).isNull(); //FS created fileSystem.getRealJGitFileSystem(); names = tempDir.list(); assertThat(names).contains(dirPathName); repos = new File(tempDir, dirPathName).list(); assertThat(repos).contains("repo-name.git"); } }
@DataProvider(value = { "50000 | false", "50001 | true" }, splitBy = "\\|") @Test public void default_method_implementations_return_expected_values(int rawContentLengthBytes, boolean shouldValidateAsync) { // given Endpoint<?> defaultImpl = (Endpoint<Object>) () -> null; RequestInfo<?> reqMock = mock(RequestInfo.class); doReturn(rawContentLengthBytes).when(reqMock).getRawContentLengthInBytes(); // expect assertThat(defaultImpl.isValidateRequestContent(null)).isTrue(); assertThat(defaultImpl.validationGroups(null)).isNull(); assertThat(defaultImpl.customRequestContentDeserializer(null)).isNull(); assertThat(defaultImpl.customResponseContentSerializer(null)).isNull(); assertThat(defaultImpl.requestContentType()).isNull(); assertThat(defaultImpl.completableFutureTimeoutOverrideMillis()).isNull(); assertThat(defaultImpl.shouldValidateAsynchronously(reqMock)).isEqualTo(shouldValidateAsync); }
@Test(groups = "unit") public void should_not_serialize_raw_query_values() { RegularStatement select = select().from("test").where(gt("i", raw("1"))); assertThat(select.getQueryString()).doesNotContain("?"); assertThat(select.getValues(ProtocolVersion.NEWEST_SUPPORTED, CodecRegistry.DEFAULT_INSTANCE)) .isNull(); }