Ejemplo n.º 1
0
        public void FindByFirstnameTest()
        {
            //Arrange
            People    people = new People();
            ToDoItems toDo   = new ToDoItems();

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

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

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

            //Act

            ToDo[] result  = toDo.FindByFirstname(Jane);
            ToDo[] result2 = toDo.FindByFirstname(John);

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