Пример #1
0
        public void WhenThen1()
        {
            var algorithm  = new TheTimeInTheWords();
            var input      = @"3
00";
            var textWriter = new StringReader(input);

            int h = Convert.ToInt32(textWriter.ReadLine());

            int m = Convert.ToInt32(textWriter.ReadLine());

            string result = algorithm.timeInWords(h, m);

            Assert.AreEqual("three o' clock", result);
        }
Пример #2
0
        public void WhenThen()
        {
            var algorithm  = new TheTimeInTheWords();
            var input      = @"5
47";
            var textWriter = new StringReader(input);

            int h = Convert.ToInt32(textWriter.ReadLine());

            int m = Convert.ToInt32(textWriter.ReadLine());

            string result = algorithm.timeInWords(h, m);

            Assert.AreEqual("thirteen minutes to six", result);
        }