public void DefaultValidation_WithCityThatsNull_ShouldThrowException() { ICityValidator cityValidator = new CityValidator(); Action action = () => cityValidator.DefaultValidation(null as City); action.Should().Throw <NullReferenceException>().WithMessage("City Cannot be null"); }
public void DefaultValidation_WithCityHasNoName_ShouldThrowException() { ICityValidator cityValidator = new CityValidator(); Action action = () => cityValidator.DefaultValidation(new City() { }); action.Should().Throw <ArgumentException>().WithMessage("City Needs a Name"); }