@Test public void testSplitJoinEmptyItem() { testSplitJoinRoundtrip("a\tb\t\td", '\t', Arrays.asList("a", "b", "", "d")); }
@Test(groups = "ftp") public void testFTPNotExist() throws IOException{ tstExists(UNAVAILABLE_FTP_URL, false); }
@Test(groups = "ftp") public void testFTPOpenInputStream() throws IOException{ tstStream(AVAILABLE_FTP_URL); }
@Test(groups = "ftp") public void testFTPDoesExist() throws IOException{ tstExists(AVAILABLE_FTP_URL, true); }
@Test public void testSplitJoinEmpty() { testSplitJoinRoundtrip("", '\t', Arrays.asList("")); }
@Test public void testHTTPOpenInputStream() throws IOException{ tstStream(AVAILABLE_HTTP_URL); }
@Test public void testHTTPDoesExist() throws IOException{ tstExists(AVAILABLE_HTTP_URL, true); }
@Test public void testSplitJoinSingleItem() { testSplitJoinRoundtrip("a", '\t', Arrays.asList("a")); }
@Test public void testFileOpenInputStream() throws IOException{ File tempFile = File.createTempFile(getClass().getSimpleName(), ".tmp"); tempFile.deleteOnExit(); OutputStream os = IOUtil.openFileForWriting(tempFile); BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os)); writer.write("hello"); writer.close(); tstStream(tempFile.getAbsolutePath()); tstStream(tempFile.toURI().toString()); }
@Test public void testHTTPNotExist() throws IOException{ tstExists(UNAVAILABLE_HTTP_URL, false); }
@Test public void testSplitJoinEmptyAtEnd() { testSplitJoinRoundtrip("a\tb\t\td\t", '\t', Arrays.asList("a", "b", "", "d", "")); }
@Test public void testInMemoryNioFileOpenInputStream() throws IOException{ FileSystem fs = Jimfs.newFileSystem(Configuration.unix()); Path file = fs.getPath("/file"); Files.write(file, "hello".getBytes("UTF-8")); tstStream(file.toUri().toString()); }
@Test public void testSplitJoinEmptyFirst() { testSplitJoinRoundtrip("\ta\tb", '\t', Arrays.asList("", "a", "b")); }
@Test public void testInMemoryNioFileDoesExist() throws IOException{ FileSystem fs = Jimfs.newFileSystem(Configuration.unix()); Path file = fs.getPath("/file"); Files.createFile(file); tstExists(file.toUri().toString(), true); }
@Test public void testInMemoryNioFileDoesNotExist() throws IOException{ FileSystem fs = Jimfs.newFileSystem(Configuration.unix()); Path file = fs.getPath("/file"); tstExists(file.toUri().toString(), false); }