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