public void ProvidernameMustBeNonemptyAndNonnull() { InsurancePolicy i = getValidInsurancePolicy(); InsurancePolicyValidator v = new InsurancePolicyValidator(); i.ProviderName = String.Empty; v.ShouldHaveValidationErrorFor(ins => ins.ProviderName, i); i.ProviderName = null; v.ShouldHaveValidationErrorFor(ins => ins.ProviderName, i); }
public void PolicyNumberMustBeNonemptyAndNonnull() { InsurancePolicy i = getValidInsurancePolicy(); InsurancePolicyValidator v = new InsurancePolicyValidator(); i.PolicyNumber = String.Empty; v.ShouldHaveValidationErrorFor(ins => ins.PolicyNumber, i); i.PolicyNumber = null; v.ShouldHaveValidationErrorFor(ins => ins.PolicyNumber, i); }