예제 #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");
        }
예제 #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");
        }