File dir = new File( "target/jcr" );
FileUtils.deleteDirectory( dir );
+ assertTrue( confFile.exists() );
+ assertFalse( dir.exists() );
+
TransientRepository repository = new TransientRepository( confFile, dir );
session = repository.login( new SimpleCredentials( "username", "password".toCharArray() ) );
public void tearDown()
throws Exception
{
- session.logout();
+ if ( session != null )
+ {
+ session.logout();
+ }
super.tearDown();
}
expectedStatistics.setTotalCountForType( "xml", 3 );
expectedStatistics.setTotalCountForType( "war", 2 );
expectedStatistics.setTotalCountForType( "pom", 144 );
+ expectedStatistics.setRepositoryId( TEST_REPO );
verify( metadataRepository ).addMetadataFacet( TEST_REPO, expectedStatistics );
}
private RepositoryStatistics createTestStats( Date startTime, Date endTime )
{
RepositoryStatistics stats = new RepositoryStatistics();
+ stats.setRepositoryId( TEST_REPO_ID );
stats.setScanStartTime( startTime );
stats.setScanEndTime( endTime );
stats.setTotalArtifactFileSize( 20 * 12345L );