Writing automatic tests requiring external resources

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (3)

View Page History
final BaseUser user1 = new BaseUser();

// A temporary file create at the root of a use home directory.
// An empty temporary file created at the root of a user home directory.
final String aTemporaryFileOfUser1 = this.ftpServer.registerUser(user1);

// A non-empty temporary file created at the root of a user home directory.
final String aTemporaryFileWithContentOfUser1 = this.ftpServer.registerFile(user1);
final FileOutputStream fos = new FileOutputStream(new File(user1.getHomeDirectory(), aTemporaryFileWithContentOfUser1));
try {
fos.write("<test />".getBytes());
} finally {
fos.close();
}

// ...
}