예제 #1
0
        [Test]//, ExpectedException(typeof(BadlyFormedTime))]
        public void testFormat_BAD_PM()
        {
            Console.WriteLine("format");
            String        input    = "13:25AM";
            TimeFormatter instance = new TimeFormatter();

            Assert.Throws <BadlyFormedTime>(() => instance._format(input));
        }
예제 #2
0
        public void testFormat_PM_TO_24()
        {
            Console.WriteLine("format");
            String        input     = "4:25PM";
            TimeFormatter instance  = new TimeFormatter();
            String        expResult = "16:25";
            String        result    = instance._format(input);

            Assert.AreEqual(expResult, result);
        }
예제 #3
0
        public void testFormat_Edge_1202AM()
        {
            Console.WriteLine("format");
            String        input     = "12:02AM";
            TimeFormatter instance  = new TimeFormatter();
            String        expResult = "00:02";
            String        result    = instance._format(input);

            Assert.AreEqual(expResult, result);
        }