}
public void testRemoveLocalRepository()
throws Exception
{
LocalRepository repository = localRepositoryDao.getLocalRepositoryByName( testLocalRepository2.getName() );
ProjectGroup projectGroup = projectGroupDao.getProjectGroupByGroupId( testProjectGroup2.getGroupId() );
assertLocalRepositoryEquals( testLocalRepository2, projectGroup.getLocalRepository() );
projectGroup.setLocalRepository( null );
projectGroupDao.updateProjectGroup( projectGroup );
projectGroup = projectGroupDao.getProjectGroup( testProjectGroup2.getId() );
assertNull( "check local repository", projectGroup.getLocalRepository() );
List<RepositoryPurgeConfiguration> repoPurgeList =
repositoryPurgeConfigurationDao.getRepositoryPurgeConfigurationsByLocalRepository( repository.getId() );
assertEquals( "check # repo purge config", 1, repoPurgeList.size() );
repositoryPurgeConfigurationDao.removeRepositoryPurgeConfiguration( repoPurgeList.get( 0 ) );
localRepositoryDao.removeLocalRepository( repository );