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