Example #1
0
        public ProgramTests()
        {
            _input = new FakeInput();
            _input.EnterLine("5:00 PM");
            _input.EnterLine("9:00 PM");
            _input.EnterLine("9:00 PM");

            _output = new FakeOutput();
            var services = new ServiceCollection()
                           .AddBabySitterCli()
                           .Replace(new ServiceDescriptor(typeof(IOutput), p => _output, ServiceLifetime.Singleton))
                           .Replace(new ServiceDescriptor(typeof(IInput), p => _input, ServiceLifetime.Singleton));

            _program = new Program(services);
        }
Example #2
0
        public void ShouldAskForStartTime()
        {
            _input.EnterLine("N");
            _program.Execute();

            Assert.Contains("Please enter start time:", _output.Messages);
        }