public void MustNotHaveInvalidSchooling(string invalidSchooling) { // Then Assert.Throws <DomainException>(() => MemberPersonalDataBuilder.New().WithSchooling(invalidSchooling).Build()) .WithMessage(MemberPersonalDataValidation.SchoolingIsEmpty, MemberPersonalDataValidation.SchoolingIsInvalid); }
public void MustNotHaveInvalidMaritalStatus(string invalidMaritalStatus) { // Then Assert.Throws <DomainException>(() => MemberPersonalDataBuilder.New().WithMaritalStatus(invalidMaritalStatus).Build()) .WithMessage(MemberPersonalDataValidation.MaritalStatusIsEmpty, MemberPersonalDataValidation.MaritalStatusIsInvalid); }
public void MustNotHaveInvalidName(string invalidName) { // Then Assert.Throws <DomainException>(() => MemberPersonalDataBuilder.New().WithName(invalidName).Build()) .WithMessage(MemberPersonalDataValidation.NameIsEmpty, MemberPersonalDataValidation.NameInvalidNumberOfCharacters); }
public void MustNotHaveInvalidDateOfBirth(DateTime dateOfBirth) { // Then Assert.Throws <DomainException>(() => MemberPersonalDataBuilder.New().WithDateOfBirth(dateOfBirth).Build()) .WithMessage(MemberPersonalDataValidation.DateOfBirthIsInvalid); }
public MemberPersonalDataTest() { _memberPersonalData = MemberPersonalDataBuilder.New().Build(); }