Skip to content
Snippets Groups Projects
Commit 954f9b6d authored by cramakri's avatar cramakri
Browse files

MINOR: Fixed tests to run outside of svn. They were expecting that .svn...

MINOR: Fixed tests to run outside of svn. They were expecting that .svn folders were in the test data

SVN: 22925
parent 8ff1e34b
No related branches found
No related tags found
No related merge requests found
Showing
with 18 additions and 4 deletions
......@@ -37,8 +37,21 @@ public class FileInfoDssBuilderTest extends AssertJUnit
ArrayList<FileInfoDssDTO> list = new ArrayList<FileInfoDssDTO>();
File requestedFile = new File(root);
builder.appendFileInfosForFile(requestedFile, list, false);
// The 3 test files + 1 sub dir + .svn
assertEquals(5, list.size());
removeSvnFoldersFromList(list);
// The 3 test files + 1 sub dir
assertEquals(4, list.size());
}
private void removeSvnFoldersFromList(ArrayList<FileInfoDssDTO> list)
{
// Copy the list since we will modify it
for (FileInfoDssDTO info : new ArrayList<FileInfoDssDTO>(list))
{
if (info.getPathInDataSet().endsWith(".svn"))
{
list.remove(info);
}
}
}
@Test
......@@ -50,8 +63,9 @@ public class FileInfoDssBuilderTest extends AssertJUnit
ArrayList<FileInfoDssDTO> list = new ArrayList<FileInfoDssDTO>();
File requestedFile = new File(root);
builder.appendFileInfosForFile(requestedFile, list, false);
// The 3 test files + 1 sub dir + .svn
assertEquals(5, list.size());
removeSvnFoldersFromList(list);
// The 3 test files + 1 sub dir
assertEquals(4, list.size());
}
@Test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment