public void CommandLineArgsAreAssembledAndPassedToController() { var repo = new MemoryRepository(); var todo = new TodoList(repo); var controller = new TodoController(todo); var runner = new AppRunner(controller); string[] args = new[] { "add", "task", "one" }; runner.Run(args); Assert.Equal("task one", todo.List()[0]); }
public void CanAddItems() { var repo = new MemoryRepository(); var todo = new TodoList(repo); var controller = new TodoController(todo); controller.Input("add item one"); controller.Input("Add item two"); controller.Input("aDD item three"); var list = todo.List(); Assert.Equal("item one", list[0]); Assert.Equal("item two", list[1]); Assert.Equal("item three", list[2]); Assert.Equal(3, list.Length); }