public void ShouldMapWithoutEmail() { var mapper = new CreateParentModelToParentMapper(); var parentModelBuilder = new CreateParentModelBuilder(); var parentEnrollmentInfoModel = parentModelBuilder.Build(); var parent = mapper.Build(parentEnrollmentInfoModel); parent.FirstName.ShouldBe(parentEnrollmentInfoModel.FirstName); parent.LastSurname.ShouldBe(parentEnrollmentInfoModel.LastName); parent.SexTypeId.ShouldBe((int)parentEnrollmentInfoModel.Sex.GetValueOrDefault()); var parentTelephone = parent.ParentTelephones.First(); parentTelephone.TelephoneNumber.ShouldBe(parentEnrollmentInfoModel.TelephoneNumber); parentTelephone.TelephoneNumberTypeId.ShouldBe((int)TelephoneNumberTypeEnum.Emergency1); parent.ParentElectronicMails.ShouldBeEmpty(); }
public static CreateStudentModel CreateStudent() { var parentBuilder = new CreateParentModelBuilder(); return new CreateStudentModel { StudentUsi = StudentUsi, FirstName = FirstName, LastName = LastName, Sex = SexTypeEnum, BirthDate = BirthDate, HispanicLatinoEthnicity = HispanicLatinoEthnicity, Race = AmericanIndianAlaskanNative, Address = Address1, Address2 = Address2, City = City, State = StateAbbreviationTypeEnum, PostalCode = PostalCode, HomeLanguage = LanguageDescriptorEnum, FirstParent = parentBuilder.WithEmailAddress().Build(), SecondParent = parentBuilder.Build() }; }