Example #1
0
        public void GetGreeting_AfterNoon_ReturnsCorrectValue()
        {
            ITimeSupplier timeSupplier = new TimeSupplierStub(new DateTime(2014, 5, 22, 14, 0, 0));

            Greeting greetingSut = new Greeting(timeSupplier);

            greetingSut.GetGreeting().Should().Be("Good Afternoon");
        }
Example #2
0
        public void GetGreeting_Morning_ReturnsCorrectValue()
        {
            ITimeSupplier timeSupplier = new TimeSupplierStub(new DateTime(2014, 5, 22, 6, 0, 0));

            Greeting greetingSut = new Greeting(timeSupplier);

            greetingSut.GetGreeting().Should().Be("Good Morning");
        }