public void all_properties_match_the_source() { var user = new User { FirstName = "Test", LastName = "User" }; user.AddPhoneNumber(p => p.WithValue("5126852220").WithType(PhoneNumberType.Home)); user.AddEmailAddress(p => p.WithValue("*****@*****.**").WithType(EmailType.Home)); var detailsModel = _mappingRegistry.Map<User, UserDetailsModel>(user); detailsModel .FirstName .ShouldEqual(user.FirstName); detailsModel .LastName .ShouldEqual(user.LastName); detailsModel .EmailAddresses .ShouldHaveCount(1); detailsModel .EmailAddresses .First() .Value .ShouldEqual("*****@*****.**"); detailsModel .PhoneNumbers .ShouldHaveCount(1); detailsModel .PhoneNumbers .First() .Value .ShouldEqual("5126852220"); }
public void SetUp() { _subject = new User(); }