Skip to content

Commit

Permalink
Fix addFolderSuffix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
madanadit committed Jul 7, 2016
1 parent 1fe435e commit 2ff63f2
Showing 1 changed file with 12 additions and 8 deletions.
Expand Up @@ -37,23 +37,27 @@ public final void before() {
}

/**
* Tests the {@link SwiftUnderFileSystem#makeQualifiedPath(String)} method.
* Tests the {@link SwiftUnderFileSystem#addFolderSuffixIfNotPresent(String)} (String)} method.
*/
@Test
public void makeQualifiedPathTest() throws Exception {
public void addFolderSuffixIfNotPresentTest() throws Exception {
String input1 = "a/b";
String input2 = "/a/b";
String input3 = "a/b/";
String input4 = "/a/b/";
String result1 = Whitebox.invokeMethod(mMockSwiftUnderFileSystem, "makeQualifiedPath", input1);
String result2 = Whitebox.invokeMethod(mMockSwiftUnderFileSystem, "makeQualifiedPath", input2);
String result3 = Whitebox.invokeMethod(mMockSwiftUnderFileSystem, "makeQualifiedPath", input3);
String result4 = Whitebox.invokeMethod(mMockSwiftUnderFileSystem, "makeQualifiedPath", input4);
String result1 = Whitebox.invokeMethod(mMockSwiftUnderFileSystem,
"addFolderSuffixIfNotPresent", input1);
String result2 = Whitebox.invokeMethod(mMockSwiftUnderFileSystem,
"addFolderSuffixIfNotPresent", input2);
String result3 = Whitebox.invokeMethod(mMockSwiftUnderFileSystem,
"addFolderSuffixIfNotPresent", input3);
String result4 = Whitebox.invokeMethod(mMockSwiftUnderFileSystem,
"addFolderSuffixIfNotPresent", input4);

Assert.assertEquals(result1, "a/b/");
Assert.assertEquals(result2, "a/b/");
Assert.assertEquals(result2, "/a/b/");
Assert.assertEquals(result3, "a/b/");
Assert.assertEquals(result4, "a/b/");
Assert.assertEquals(result4, "/a/b/");
}

/**
Expand Down

0 comments on commit 2ff63f2

Please sign in to comment.