}
public void testAddBuildDefinitionToProjectGroup()
throws ContinuumStoreException
{
ProjectGroup projectGroup =
projectGroupDao.getProjectGroupWithBuildDetailsByProjectGroupId( defaultProjectGroup.getId() );
Profile profile = profileDao.getProfile( testProfile1.getId() );
Schedule schedule = scheduleDao.getSchedule( testSchedule1.getId() );
BuildDefinition buildDefinition = createTestBuildDefinition( "TABDTPG arguments", "TABDTPG buildFile",
"TABDTPG goals", profile, schedule, false, false );
BuildDefinition copy = createTestBuildDefinition( buildDefinition );
projectGroup.addBuildDefinition( buildDefinition );
projectGroupDao.updateProjectGroup( projectGroup );
projectGroup = projectGroupDao.getProjectGroupWithBuildDetailsByProjectGroupId( defaultProjectGroup.getId() );
assertEquals( "check # build defs", 2, projectGroup.getBuildDefinitions().size() );
BuildDefinition retrievedBuildDefinition = projectGroup.getBuildDefinitions().get( 1 );
assertBuildDefinitionEquals( copy, retrievedBuildDefinition );
assertScheduleEquals( testSchedule1, retrievedBuildDefinition.getSchedule() );
assertProfileEquals( testProfile1, retrievedBuildDefinition.getProfile() );
}