public void DisplayLogHeaderStateReturnsReadState() { IConsole mockConsole = Substitute.For<IConsole>(); ILog mockLog = Substitute.For<ILog>(); ITodoList mockTodoList = Substitute.For<ITodoList>(); DisplayLogHeaderState state = new DisplayLogHeaderState(mockConsole, mockLog, mockTodoList); Assert.IsInstanceOfType(state.GetNextState(), typeof(ReadState)); }
static void Main(string[] args) { Console.SetWindowSize(Console.WindowWidth, 60); Console.SetIn(new StreamReader(Console.OpenStandardInput(8192))); Log log = new Log(); TodoList todoList = new TodoList(); LogConsole console = new LogConsole(); State nextState = new DisplayLogHeaderState(console, log, todoList); while(null != nextState) { nextState.Execute(); nextState = nextState.GetNextState(); } }