public void Test_Employee_InvalidEmptyOrNullTelephoneExtension_ShouldBeFail() { Employee employee = ObjectMotherEmployee.GetEmployeeWithEmptyTelephoneExtension(); employee.Id = 0; Action comparison = employee.Validate; comparison.Should().Throw <EmployeeEmptyOrNullTelephoneExtensionException>(); }
public void EmployeeService_Update_InvalidEmptyOrNullBranch_ShouldBeFail() { Employee employee = ObjectMotherEmployee.GetEmployeeWithEmptyTelephoneExtension(); employee.Id = 1; Action executeAction = () => _service.Update(employee); executeAction.Should().Throw <EmployeeEmptyOrNullTelephoneExtensionException>(); _mockRepository.VerifyNoOtherCalls(); }