public void TearDownRelatedData() { ItemHoursRepository repository = new ItemHoursRepository(ConfigSettings.MySqlDatabaseConnectionName); repository.ClearCollection(); CostCentreRepository costCentreRepository = new CostCentreRepository(ConfigSettings.MySqlDatabaseConnectionName); costCentreRepository.ClearCollection(); HourTypeRepository hourTypeRepository = new HourTypeRepository(ConfigSettings.MySqlDatabaseConnectionName); hourTypeRepository.ClearCollection(); }
public void SetUpRelatedData() { ItemHoursRepository repository = new ItemHoursRepository(ConfigSettings.MySqlDatabaseConnectionName); repository.ClearCollection(); CostCentreRepository costCentreRepository = new CostCentreRepository(ConfigSettings.MySqlDatabaseConnectionName); CostCentreEntity costCentreEntity = HoursData.GetCostCentreForInsert(); costCentreRepository.ClearCollection(); _costCentre = costCentreRepository.Create(costCentreEntity); HourTypeRepository hourTypeRepository = new HourTypeRepository(ConfigSettings.MySqlDatabaseConnectionName); HourTypeEntity hourTypeEntity = HoursData.GetHourTypeForInsert(); hourTypeRepository.ClearCollection(); _hourType = hourTypeRepository.Create(hourTypeEntity); }