public void TearDownRelatedData()
		{
			RoomHoursRepository repository = new RoomHoursRepository(ConfigSettings.MySqlDatabaseConnectionName);
			repository.ClearCollection();

			CostCentreRepository costCentreRepository = new CostCentreRepository(ConfigSettings.MySqlDatabaseConnectionName);
			costCentreRepository.ClearCollection();

			HourTypeRepository hourTypeRepository = new HourTypeRepository(ConfigSettings.MySqlDatabaseConnectionName);
			hourTypeRepository.ClearCollection();
		}
		public void ShouldCreateCostCentre()
		{
			// Arrange
			CostCentreRepository repository = new CostCentreRepository(ConfigSettings.MySqlDatabaseConnectionName);
			CostCentreEntity entity = HoursData.GetCostCentreForInsert();
			repository.ClearCollection();
			// Act
			entity = repository.Create(entity);

			// Assert
			Assert.IsNotNull(entity);
			Assert.AreNotEqual(0, entity.Id);
		}
		public void ShouldCreateCostCentres()
		{
			// Arrange
			CostCentreRepository repository = new CostCentreRepository(ConfigSettings.MySqlDatabaseConnectionName);
			List<CostCentreEntity> entities = HoursData.GetCostCentresForInsert();
			repository.ClearCollection();

			// Act
			entities = repository.Create(entities);

			// Assert
			Assert.IsNotNull(entities);
			Assert.AreEqual(2, entities.Count);
		}
		public void SetUpRelatedData()
		{
			RoomHoursRepository repository = new RoomHoursRepository(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);
		}
		public void ShouldReadCostCentreWithId()
		{
			// Arrange
			CostCentreRepository repository = new CostCentreRepository(ConfigSettings.MySqlDatabaseConnectionName);
			CostCentreEntity entity = HoursData.GetCostCentreForInsert();
			repository.ClearCollection();

			// Act
			entity = repository.Create(entity);

			// Act
			var actual = repository.Read(entity.Id);

			// Assert
			Assert.AreEqual(entity.Code, actual.Code);
		}
		public void ShouldUpdateCostCentre()
		{
			// Arrange
			CostCentreRepository repository = new CostCentreRepository(ConfigSettings.MySqlDatabaseConnectionName);
			CostCentreEntity entity = HoursData.GetCostCentreForInsert();
			repository.ClearCollection();
			entity = repository.Create(entity);
			entity.Code = "87";

			// Act
			CostCentreEntity actual = repository.Update(entity);

			// Assert
			Assert.AreEqual(entity.Code, actual.Code);
		}
		public void ShouldDeleteCostCentre()
		{
			// Arrange
			CostCentreRepository repository = new CostCentreRepository(ConfigSettings.MySqlDatabaseConnectionName);
			CostCentreEntity entity = HoursData.GetCostCentreForInsert();
			repository.ClearCollection();
			entity = repository.Create(entity);

			// Act
			CostCentreEntity actual = repository.Delete(entity);

			// Assert
			Assert.AreNotEqual(actual.DeletedDate,DateTime.MinValue);
		}