forked from frankframework/frankframework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow create folder when creating/writing to a file (frankframework#5220
- Loading branch information
Showing
43 changed files
with
992 additions
and
628 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
core/src/test/java/nl/nn/adapterframework/filesystem/FTPFileRefTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package nl.nn.adapterframework.filesystem; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import nl.nn.adapterframework.ftp.FTPFileRef; | ||
|
||
public class FTPFileRefTest { | ||
|
||
@Test | ||
public void testFTPFileRefSetRelative() { | ||
assertEquals("test123", new FTPFileRef("test123").getName()); | ||
assertEquals("folder/test123", new FTPFileRef("folder/test123").getName()); | ||
} | ||
|
||
@Test | ||
public void testFTPFileRefSetFolder() { | ||
FTPFileRef ref1 = new FTPFileRef("test123", "folder"); | ||
assertEquals("folder/test123", ref1.getName()); | ||
} | ||
|
||
@Test | ||
public void testFTPFileRefRelativeWithSetFolder() { | ||
FTPFileRef ref2 = new FTPFileRef("folder1/test123", "folder2"); | ||
assertEquals("folder2/test123", ref2.getName()); | ||
} | ||
|
||
@Test | ||
public void testFTPFileRefWindowsSlash() { | ||
FTPFileRef ref2 = new FTPFileRef("folder1\\test123", "folder2"); | ||
assertEquals("folder2/test123", ref2.getName()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.