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