コード例 #1
0
 @Test(
     groups = {"fast-unit"},
     expectedExceptions = LocalFileNotFound.class)
 public void copyingFileThatDoesntExist_should_throw_LocalFileNotFound() {
   File nonExistingFile = new File("file-does-not-exist");
   putter.putFile(nonExistingFile);
 }
コード例 #2
0
 @Test(groups = {"fast-unit"})
 public void
     after_putFile_then_deleteMyFiles_should_removeTheDirectory_where_thisClassPutFilesOnTheFileSystem()
         throws IOException {
   Path myFiles = putter.getPathOfMyFiles();
   putter.putFile(createFile());
   assertTrue(fileSystem.exists(myFiles));
   putter.deleteMyFiles();
   assertFalse(fileSystem.exists(myFiles));
 }
コード例 #3
0
 @Test(groups = {"fast-unit"})
 public void copyingFileThatExists_should_existInFileSystemCopiedTo() throws IOException {
   File tempFile = createFile();
   putter.putFile(tempFile);
   assertTrue(putter.isFileCopiedToFileSystem(tempFile));
 }