Пример #1
0
        public void Given_system_default_hazard_When_mark_for_delete_Then_should_throw_the_correct_exception()
        {
            //Given
            var result = new MyHazard();
            result.MarkHazardAsSystemDefault();

            //When
            //Then
            Assert.Throws<AttemptingToDeleteSystemDefaultException>(() => result.MarkForDelete(It.IsAny<UserForAuditing>()));
        }
Пример #2
0
 public void Given_system_default_hazard_When_update_Then_should_throw_the_correct_exception()
 {
     //Given
     var result = new MyHazard();
     result.MarkHazardAsSystemDefault();
     var hazardTypes = new[] { new HazardType(), new HazardType(), };
     
     //When
     //Then
     Assert.Throws<AttemptingToUpdateSystemDefaultException>(() => result.Update("", 1, null, hazardTypes));
 }