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