|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (1)
View Page History}
{code}
{code}
{tip}If a home directory is set for the user, it will be automatically created if it does not exist.{tip}
h2. Registering a file
Use the API '{{registerFile(...)}}' to mock existing file into a user home directory:
* {{registerFile(User)}}: will create a temporary file at the root of the user home directory. The filename relative to the user home directory is returned.
{code}
public static class HasFTPServer {
@Rule
public FTPServer ftpServer = new FTPServer();
@Test
public void testUsingFTPServer() throws IOException {
// ...
final BaseUser user = new BaseUser();
// ...
this.ftpServer.registerUser(user);
// ...
final String aTemporaryFile = this.ftpServer.registerFile(user);
// ...
}
}
{code}