public string CustomerRentsCar(string carCategory, string customerSocialSecurityNumber, decimal currentMilage) { if (!CarCategories.IsOfThisType(carCategory)) { throw new ArgumentNullException("carCategory"); } if (!SocialSecurityNumber.IsValid(customerSocialSecurityNumber)) { throw new ArgumentNullException("customerSocialSecurityNumber"); } return(CreateAndSaveACarRental(carCategory, customerSocialSecurityNumber, currentMilage)); }
public void Ssn_Invalid(string ssn) { Assert.False(SocialSecurityNumber.IsValid(ssn)); }
public void Ssn_Valid(string ssn) { Assert.True(SocialSecurityNumber.IsValid(ssn)); }
public void ShouldFailTheseSocialSecurityNumbers(string input) { Assert.IsFalse(SocialSecurityNumber.IsValid(input), input); }
public void ShouldPassTheseSocialSecurityNumbers(string input) { Assert.IsTrue(SocialSecurityNumber.IsValid(input), input); }