示例#1
0
        public void CreateFromOther_should_create_new_ionstance_of_Contact_with_provided_Id_and_other_values_coppied_from_other_contact()
        {
            var contact = new Contact(1, new Name("Jhon"), new Name("Smith"), new BirthDate(new DateTime(1980, 3, 24)), null, null);
            var other   = factory.CreateFromOther(2, contact);

            Assert.AreEqual(2, other.Id);
            Assert.AreEqual(contact.FirstName, other.FirstName);
            Assert.AreEqual(contact.LastName, other.LastName);
            Assert.AreEqual(contact.BirthDate, other.BirthDate);
            Assert.AreEqual(0, other.Emails.Count);
            Assert.AreEqual(0, other.PhoneNumbers.Count);
        }