@Test
public void testExplore() throws RepositoryExplorerException, IOException {
RepositoryExplorer explorer = new RepositoryExplorer();
explorer.setSvnClientProvider(new MockSvnClientProvider());
ExtractedData data = explorer.explore(config);
assertEquals(2, data.getAuthors().size());
Collection<VersionedFile> files = data.getFiles();
int initialLoc = 0;
int currentLoc = 0;
for(VersionedFile file : files){
initialLoc += file.getInitialLoc();
currentLoc += file.getCurrentLoc();
}
assertEquals(24, data.getAuthorByName("sergio").getInitialLoc());
assertEquals(36, data.getAuthorByName("ivan").getInitialLoc());
assertEquals(52, data.getAuthorByName("sergio").getCurrentLoc());
assertEquals(78, data.getAuthorByName("ivan").getCurrentLoc());
assertEquals(417, data.getAuthorByName("sergio").getLineCount().getNewLines());
assertEquals(14, data.getAuthorByName("ivan").getLineCount().getNewLines());
assertEquals(23, data.getAuthorByName("sergio").getLineCount().getDeletedLines());
assertEquals(3, data.getAuthorByName("ivan").getLineCount().getDeletedLines());
assertEquals(13, files.size());
assertEquals(60, initialLoc);
assertEquals(130, currentLoc);
assertEquals(60, data.getTotalInitialLoc());
assertEquals(130, data.getTotalCurrentLoc());
assertEquals(431, data.getTotalAddedLoc());
assertEquals(26, data.getTotalDeletedLoc());
assertEquals("http://project.com/svnroot/trunk/src",
data.getRepository().getUrl());
}