Пример #1
0
        public void ConsoleWrite_Write_Console()
        {
            string            str           = "test";
            ConsoleWriterMock consoleWriter = new ConsoleWriterMock();

            consoleWriter.write(str);
            Assert.Equal(1, consoleWriter.WriteIsCalled);
        }
Пример #2
0
        public void Acceptance_Test_Task_Created()
        {
            string            cmd             = "tasks create  \"Acheter du pain\"";
            InputReaderFake   inputReaderFake = new InputReaderFake();
            Command           command         = inputReaderFake.readInput(cmd);
            CommandReaderFake commandReader   = new CommandReaderFake();
            Task              task            = commandReader.createTask(command);
            String            str             = task.getId();
            ConsoleWriterMock consoleWriter   = new ConsoleWriterMock();

            consoleWriter.write(str);
            Assert.Equal(1, consoleWriter.WriteIsCalled);
        }