Пример #1
0
        public void ContactsAddressSameAsPerson()
        {
            string street = "132 Street";
            string image = "test.jpg";
            IPerson person = new Person();
            person.Address = new Address();
            person.Address.City = "Somewhere";
            Contact contact = new Contact(person);

            Assert.Equal(person.Address.City, contact.Address.City);
            Assert.Equal(person.DateOfBirth, contact.DateOfBirth);
            Assert.Equal(person.Aliases, contact.Aliases);
            Assert.Equal(person.DateOfDeath, contact.DateOfDeath);
            Assert.Equal(person.Gender, contact.Gender);
            Assert.Equal(person.PrimaryName, contact.PrimaryName);
            Assert.Equal(person.TimeLine, contact.TimeLine);
            Assert.Null(contact.Image);

            contact.Address = new Address(street);
            contact.DateOfBirth = new DateTime(2012, 6, 25);
            contact.DateOfDeath = new DateTime(2012, 6, 30);
            contact.Gender = "Male";
            contact.Image = image;

            Assert.Equal(person.DateOfDeath, contact.DateOfDeath);
            Assert.Equal(person.Gender, contact.Gender);
            Assert.Equal(person.Address.Street, contact.Address.Street);
            Assert.Equal(person.DateOfBirth, contact.DateOfBirth);
            Assert.Equal(image, contact.Image);
        }
Пример #2
0
        public void InitializedContactEmailIsEmpty()
        {
            IPerson person = new Person();
            Contact contact = new Contact(person);

            Assert.Equal(string.Empty, contact.Email);
        }
Пример #3
0
        public void InitializedPersonHasNullPrimaryName()
        {
            Person person = new Person();

            Assert.NotNull(person.PrimaryName);
        }
Пример #4
0
        public void InitializedPersonHasNullTimeLine()
        {
            Person person = new Person();

            Assert.Null(person.TimeLine);
        }
Пример #5
0
        public void InitializedPersonHasNullDateOfBirth()
        {
            Person person = new Person();

            Assert.Null(person.DateOfBirth);
        }
Пример #6
0
        public void InitializedPersonHasNullAddress()
        {
            Person person = new Person();

            Assert.Null(person.Address);
        }
Пример #7
0
        public void InitializedPersonHasEmptyGender()
        {
            Person person = new Person();

            Assert.Equal(string.Empty, person.Gender);
        }
Пример #8
0
        public void InitializedPersonHasAnEmptyAliasesCollection()
        {
            Person person = new Person();

            Assert.Equal(0, person.Aliases.Count);
        }
Пример #9
0
        public void InitialiedPersonHasNullDateOfDate()
        {
            Person person = new Person();

            Assert.Null(person.DateOfDeath);
        }