private void Two_empty_names_are_equal()
        {
            var name1 = gedcomDb.NamedPerson(null, null);
            var name2 = gedcomDb.NamedPerson(null, null);

            Assert.Equal(name1, name2);
        }
Beispiel #2
0
        private void Surname_can_be_added_to_individual()
        {
            var person = gedcomDb.NamedPerson("Ryan", "/O'Neill/");

            Assert.Equal("/O'Neill/", person.Names.First().Surname);
        }
Beispiel #3
0
        private void Two_lists_with_the_same_count_but_different_individuals_are_not_equal()
        {
            var list1 = new List <GedcomIndividualRecord> {
                gedcomDb.NamedPerson("Ryan")
            };
            var list2 = new List <GedcomIndividualRecord> {
                gedcomDb.NamedPerson("David")
            };

            Assert.NotEqual(list1, list2);
        }
        private void Individual_are_sorted_alphanumerically()
        {
            var person1 = gedcomDb.NamedPerson("1");
            var person2 = gedcomDb.NamedPerson("2");

            var li = new List <GedcomIndividualRecord> {
                person1, person2
            };

            li.Sort();

            var sortOrder = person1.CompareTo(person2);

            Assert.Equal(-1, sortOrder);
        }