public void MarkItemCompletedDoesNotChange() { InMemoryContext inMemory = new InMemoryContext(); ITodoItemGateway gateway = new TodoItemGateway(inMemory); IUseCase sut = new MarkItemCompleted(gateway); sut.Execute(Guid.NewGuid()); Assert.Empty(inMemory.TodoItems.Where(e => e.Id == existingTodoItemId && e.IsCompleted)); }
public void MarkItemCompletedSuccess() { InMemoryContext inMemory = new InMemoryContext(); ITodoItemGateway gateway = new TodoItemGateway(inMemory); IUseCase sut = new MarkItemCompleted(gateway); sut.Execute(existingTodoItemId); Assert.NotEmpty(inMemory.TodoItems.Where(e => e.Id == existingTodoItemId && e.IsCompleted)); }