Пример #1
0
        public void Should_throw_exception_if_input_is_null()
        {
            var service = new SequenceAnalysisCommand {
                Input = null
            };

            service.OnExecute(_consoleMock.Object);
        }
Пример #2
0
        public void Should_return_success()
        {
            var service = new SequenceAnalysisCommand {
                Input = "This IS a STRING"
            };
            var actual = service.OnExecute(_consoleMock.Object);

            Assert.AreEqual(1, actual);
        }
Пример #3
0
        public void Should_execute_service(string input)
        {
            var service = new SequenceAnalysisCommand {
                Input = input
            };

            var expected = new SequenceAnalysis().Execute(input);

            service.OnExecute(_consoleMock.Object);

            _consoleMock.VerifyWriteLine(expected);
        }