Exemple #1
0
        public async void AddNewTodoItemToInboxAsync()
        {
            var taskName = "Test Item";
            var task     = new NirvanaTask {
                Name = taskName, Type = TaskType.TodoItem, State = TaskState.Inbox
            };
            var expected = new List <NirvanaTask>(_testData.Where(t => t.Type == TaskType.TodoItem));

            expected.Add(task);

            var sut = new TodoItemService(new FakeTaskService(_testData));

            var actual = await sut.AddNewTodoItemToInbox(taskName);

            var tasks = await sut.GetTodoItems();

            actual.Should().BeTrue();
            tasks.Should().BeEquivalentTo(expected);
        }