public void FinishRemovesDoesNotRemoveTodoItem_WhenDoesNotExist() { InMemoryContext inMemory = new InMemoryContext(); ITodoItemGateway gateway = new TodoItemGateway(inMemory); IUseCase sut = new FinishTodoItem(gateway); sut.Execute(Guid.NewGuid()); Assert.NotEmpty(inMemory.TodoItems.Where(e => e.Id == existingTodoItemId)); }
public void FinishRemovesTodoItem() { InMemoryContext inMemory = new InMemoryContext(); ITodoItemGateway gateway = new TodoItemGateway(inMemory); IUseCase sut = new FinishTodoItem(gateway); sut.Execute(existingTodoItemId); Assert.Empty(inMemory.TodoItems.Where(e => e.Id == existingTodoItemId)); }