Search in sources :

Example 1 with WindowsFakeFileSystem

use of org.mockftpserver.fake.filesystem.WindowsFakeFileSystem in project nifi by apache.

the class TestFTP method setUp.

@Before
public void setUp() throws Exception {
    fakeFtpServer.setServerControlPort(0);
    fakeFtpServer.addUserAccount(new UserAccount(username, password, "c:\\data"));
    FileSystem fileSystem = new WindowsFakeFileSystem();
    fileSystem.add(new DirectoryEntry("c:\\data"));
    fakeFtpServer.setFileSystem(fileSystem);
    fakeFtpServer.start();
    ftpPort = fakeFtpServer.getServerControlPort();
}
Also used : WindowsFakeFileSystem(org.mockftpserver.fake.filesystem.WindowsFakeFileSystem) FileSystem(org.mockftpserver.fake.filesystem.FileSystem) WindowsFakeFileSystem(org.mockftpserver.fake.filesystem.WindowsFakeFileSystem) DirectoryEntry(org.mockftpserver.fake.filesystem.DirectoryEntry) UserAccount(org.mockftpserver.fake.UserAccount) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 UserAccount (org.mockftpserver.fake.UserAccount)1 DirectoryEntry (org.mockftpserver.fake.filesystem.DirectoryEntry)1 FileSystem (org.mockftpserver.fake.filesystem.FileSystem)1 WindowsFakeFileSystem (org.mockftpserver.fake.filesystem.WindowsFakeFileSystem)1