@Test( groups = {"fast-unit"}, expectedExceptions = LocalFileNotFound.class) public void copyingFileThatDoesntExist_should_throw_LocalFileNotFound() { File nonExistingFile = new File("file-does-not-exist"); putter.putFile(nonExistingFile); }
@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)); }
@Test(groups = {"fast-unit"}) public void copyingFileThatExists_should_existInFileSystemCopiedTo() throws IOException { File tempFile = createFile(); putter.putFile(tempFile); assertTrue(putter.isFileCopiedToFileSystem(tempFile)); }