@Test( expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "Packing item is a directory") public void testPackDirectoryAsFileException() throws IOException { TarUtils.compressFile(Paths.get("target"), Paths.get("somePack")); }
@Test( expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "Packing file doesn't exist") public void testPackNonExistsFileException() throws IOException { TarUtils.compressFile(Paths.get("non-exists"), Paths.get("somePack")); }