Exemple #1
0
        //xczx
        public ToDo[] FindUnassignedTodoItems()
        {
            //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", true, John);
            ToDo itemNotDone1 = toDo.AddNewToDoNew(3, "Yet to be assigned", false);

            //Act

            ToDo[] result = toDo.FindUnassignedTodo();

            //Assert
            Assert.Contains(itemNotDone1, result);
            Assert.DoesNotContain(item1, result);
        }