Пример #1
0
        public void FindByLastnameTest()
        {
            //Arrange
            People    people = new People();
            ToDoItems toDo   = new ToDoItems();

            PersonSequencer.Reset();
            TodoSequencer.ResetID();

            Person Doe   = people.AddNewPerson(1, "Jane", "Doe");
            Person Smith = people.AddNewPerson(2, "John", "Smith");

            ToDo item1 = toDo.AddNewToDoNew(1, "Win lotto", false, Doe);
            ToDo item2 = toDo.AddNewToDoNew(2, "Learn to code", false, Smith);

            //Act

            ToDo[] result  = toDo.FindByLastname(Doe);
            ToDo[] result2 = toDo.FindByLastname(Smith);

            //Assert
            Assert.Contains(item1, result);
            Assert.Contains(item2, result2);
        }