Esempio n. 1
0
        public void TalkingClockService_ShouldReturnFivePastOne()
        {
            // act
            const string input   = "13:05";
            var          service = new TalkingClockService();

            // arrange
            var result = service.GetHumanFriendlyText(input);

            // assert
            Assert.AreEqual(result, "Five past one");
        }
Esempio n. 2
0
        public void TalkingClockService_ShouldReturnTwentyFiveToTwo()
        {
            // act
            const string input   = "13:35";
            var          service = new TalkingClockService();

            // arrange
            var result = service.GetHumanFriendlyText(input);

            // assert
            Assert.AreEqual(result, "Twenty five to two");
        }
Esempio n. 3
0
        public void TalkingClockService_ShouldReturnTwelveOClockFromTwentyFourHourClock()
        {
            // act
            const string input   = "00:00";
            var          service = new TalkingClockService();

            // arrange
            var result = service.GetHumanFriendlyText(input);

            // assert
            Assert.AreEqual(result, "Twelve o\'clock");
        }
Esempio n. 4
0
        public void TalkingClockService_ShouldReturnOneOClock()
        {
            // act
            const string input   = "1:00";
            var          service = new TalkingClockService();

            // arrange
            var result = service.GetHumanFriendlyText(input);

            // assert
            Assert.AreEqual(result, "One o\'clock");
        }