public virtual void ShouldDetermineTimeUnitAtPositionsInString()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
            CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;

            string      date     = "04:12:22";
            ITimeFormat military = new CustomTimeFormat("HH:mm:ss");

            Assert.AreEqual(TimeSpan.FromHours(1), strategy.GetTimeUnitAtTextPosition(date, 0, military));
            Assert.AreEqual(TimeSpan.FromHours(1), strategy.GetTimeUnitAtTextPosition(date, 1, military));
            Assert.AreEqual(TimeSpan.FromHours(1), strategy.GetTimeUnitAtTextPosition(date, 2, military));
            Assert.AreEqual(TimeSpan.FromMinutes(10), strategy.GetTimeUnitAtTextPosition(date, 3, military));
            Assert.AreEqual(TimeSpan.FromMinutes(1), strategy.GetTimeUnitAtTextPosition(date, 4, military));
            Assert.AreEqual(TimeSpan.FromMinutes(1), strategy.GetTimeUnitAtTextPosition(date, 5, military));
            Assert.AreEqual(TimeSpan.FromSeconds(10), strategy.GetTimeUnitAtTextPosition(date, 6, military));
            Assert.AreEqual(TimeSpan.FromSeconds(1), strategy.GetTimeUnitAtTextPosition(date, 7, military));
            Assert.AreEqual(TimeSpan.FromSeconds(1), strategy.GetTimeUnitAtTextPosition(date, 8, military));

            try
            {
                Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
                date = "4:12:22 PM";
                ITimeFormat longFormat = new LongTimeFormat();

                Assert.AreEqual(TimeSpan.FromHours(1), strategy.GetTimeUnitAtTextPosition(date, 0, longFormat));
                Assert.AreEqual(TimeSpan.FromSeconds(1), strategy.GetTimeUnitAtTextPosition(date, 7, longFormat));
                Assert.AreEqual(TimeSpan.FromHours(12), strategy.GetTimeUnitAtTextPosition(date, 8, longFormat));
                Assert.AreEqual(TimeSpan.FromHours(12), strategy.GetTimeUnitAtTextPosition(date, 9, longFormat));
                Assert.AreEqual(TimeSpan.FromHours(12), strategy.GetTimeUnitAtTextPosition(date, 10, longFormat));
            }
            finally
            {
                Thread.CurrentThread.CurrentCulture = currentCulture;
            }
        }
        public virtual void ShouldDetermineTextPositionInDateTime()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
            CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;

            string      date     = "04:12:22";
            ITimeFormat military = new CustomTimeFormat("HH:mm:ss");

            Assert.AreEqual(0, strategy.GetTextPositionForTimeUnit(date, TimeSpan.FromHours(1), military));
            Assert.AreEqual(3, strategy.GetTextPositionForTimeUnit(date, TimeSpan.FromMinutes(10), military));
            Assert.AreEqual(4, strategy.GetTextPositionForTimeUnit(date, TimeSpan.FromMinutes(1), military));
            Assert.AreEqual(6, strategy.GetTextPositionForTimeUnit(date, TimeSpan.FromSeconds(10), military));
            Assert.AreEqual(7, strategy.GetTextPositionForTimeUnit(date, TimeSpan.FromSeconds(1), military));

            try
            {
                Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
                date = "4:12:22 PM";
                ITimeFormat longFormat = new LongTimeFormat();

                Assert.AreEqual(0, strategy.GetTextPositionForTimeUnit(date, TimeSpan.FromHours(1), longFormat));
                Assert.AreEqual(8, strategy.GetTextPositionForTimeUnit(date, TimeSpan.FromHours(12), longFormat));
                Assert.AreEqual(8, strategy.GetTextPositionForTimeUnit(date, TimeSpan.FromHours(12), longFormat));
            }
            finally
            {
                Thread.CurrentThread.CurrentCulture = currentCulture;
            }
        }
        public virtual void ShouldParseTextToDateTime()
        {
            // culture is internal, need to test with a known culture.
            CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;

            try
            {
                Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
                OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
                Assert.IsTrue(strategy.ActualCulture.Name == "en-US", "This test should run under en-US culture, setting did not work as expected.");

                TimeParserCollection parsers = new TimeParserCollection {
                    new CustomTimeParser()
                };

                Assert.AreEqual(DateTime.Today.Date.AddHours(8).AddMinutes(30), strategy.ParseTime("8:30 AM", new ShortTimeFormat(), parsers));
                Assert.AreEqual(DateTime.Today.Date.AddHours(20).AddMinutes(30), strategy.ParseTime("8:30 PM", new ShortTimeFormat(), parsers));

                Assert.AreEqual(DateTime.Today.Date.AddHours(8).AddMinutes(30).AddSeconds(12), strategy.ParseTime("8:30:12 AM", new LongTimeFormat(), parsers));
                Assert.AreEqual(DateTime.Today.Date.AddHours(20).AddMinutes(30).AddSeconds(12), strategy.ParseTime("8:30:12 PM", new LongTimeFormat(), parsers));

                Assert.AreEqual(DateTime.Today.Date.AddHours(8).AddMinutes(30).AddSeconds(12), strategy.ParseTime("08:30:12", new CustomTimeFormat("hh:mm:ss"), parsers));

                Assert.AreEqual(DateTime.MinValue.Date.AddHours(15).AddMinutes(40), strategy.ParseTime("3 uur 40", new CustomTimeFormat("hh:mm:ss"), parsers));
            }
            finally
            {
                Thread.CurrentThread.CurrentCulture = currentCulture;
            }
        }
        public virtual void ShouldPassThroughCopyOfParsers()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();

            List<TimeParser> sourceParsers = new List<TimeParser>();
            sourceParsers.Add(new CustomTimeParser());

            Assert.AreNotSame(sourceParsers, strategy.GetActualTimeParsers(sourceParsers));
            Assert.IsTrue(strategy.GetActualTimeParsers(sourceParsers).Count() == 2);
        }
        public virtual void ShouldPassThroughCopyOfParsers()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();

            List <TimeParser> sourceParsers = new List <TimeParser>();

            sourceParsers.Add(new CustomTimeParser());

            Assert.AreNotSame(sourceParsers, strategy.GetActualTimeParsers(sourceParsers));
            Assert.IsTrue(strategy.GetActualTimeParsers(sourceParsers).Count() == 2);
        }
        public virtual void ShouldUseCultureDuringFormatting()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
            CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;

            try
            {
                Thread.CurrentThread.CurrentCulture = new CultureInfo("ko-KR");
                string formatted = strategy.FormatTime(new DateTime(1900, 1, 1, 5, 5, 5), new ShortTimeFormat());
                Assert.AreEqual("오전 5:05", formatted);
            }
            finally
            {
                Thread.CurrentThread.CurrentCulture = currentCulture;
            }
        }
        public virtual void ShouldUseCultureSpecificTimeDesignators()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
            CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;

            try
            {
                Thread.CurrentThread.CurrentCulture = new CultureInfo("ko-KR");
                Assert.AreEqual("오전", strategy.AMDesignator);
                Assert.AreEqual("오후", strategy.PMDesignator);
            }
            finally
            {
                Thread.CurrentThread.CurrentCulture = currentCulture;
            }
        }
        public virtual void ShouldFormatDateTimeAccordingToTimeFormat()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
            CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;

            try
            {
                Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
                Assert.AreEqual("8:03 AM", strategy.FormatTime(new DateTime(1900, 2, 3, 8, 3, 12), new ShortTimeFormat()));
                Assert.AreEqual("8:03:12 AM", strategy.FormatTime(new DateTime(1900, 2, 3, 8, 3, 12), new LongTimeFormat()));
            }
            finally
            {
                Thread.CurrentThread.CurrentCulture = currentCulture;
            }
            Assert.AreEqual("08.03.12", strategy.FormatTime(new DateTime(1900, 2, 3, 8, 3, 12), new CustomTimeFormat("HH.mm.ss")));
        }
        public virtual void ShouldFormatDateTimeAccordingToTimeFormat()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
            CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;

            try
            {
                Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
                Assert.AreEqual("8:03 AM", strategy.FormatTime(new DateTime(1900, 2, 3, 8, 3, 12), new ShortTimeFormat()));
                Assert.AreEqual("8:03:12 AM", strategy.FormatTime(new DateTime(1900, 2, 3, 8, 3, 12), new LongTimeFormat()));
            }
            finally
            {
                Thread.CurrentThread.CurrentCulture = currentCulture;
            }
            Assert.AreEqual("08.03.12", strategy.FormatTime(new DateTime(1900, 2, 3, 8, 3, 12), new CustomTimeFormat("HH.mm.ss")));
        }
        public virtual void ShouldFormatDateTimeWithFilter()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
            CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;

            try
            {
                Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
                Assert.AreEqual("8 AM", strategy.FormatTime(new DateTime(1900, 2, 3, 8, 3, 12), new ShortTimeFormat(), 'H', 'h', 't', ' '));
                Assert.AreEqual("03", strategy.FormatTime(new DateTime(1900, 2, 3, 8, 3, 12), new LongTimeFormat(), 'm'));

                Thread.CurrentThread.CurrentCulture = new CultureInfo("nl-NL");
                Assert.IsTrue(strategy.FormatTime(new DateTime(1900, 2, 3, 8, 3, 12), new ShortTimeFormat(), 'H', 'h', 't', ' ').EndsWith("8", StringComparison.Ordinal));
                Assert.AreEqual("03", strategy.FormatTime(new DateTime(1900, 2, 3, 8, 3, 12), new LongTimeFormat(), 'm'));
            }
            finally
            {
                Thread.CurrentThread.CurrentCulture = currentCulture;
            }
        }
        public virtual void ShouldUseTimeUnitClosestAtCaretWhenAtWhiteSpace()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
            CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;

            try
            {
                Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
                string      date       = "4:12   PM";
                ITimeFormat longFormat = new CustomTimeFormat("h:mm   tt");

                Assert.AreEqual(TimeSpan.FromMinutes(1), strategy.GetTimeUnitAtTextPosition(date, 4, longFormat));
                Assert.AreEqual(TimeSpan.FromMinutes(1), strategy.GetTimeUnitAtTextPosition(date, 5, longFormat));
                Assert.AreEqual(TimeSpan.FromHours(12), strategy.GetTimeUnitAtTextPosition(date, 6, longFormat));
                Assert.AreEqual(TimeSpan.FromHours(12), strategy.GetTimeUnitAtTextPosition(date, 7, longFormat));
            }
            finally
            {
                Thread.CurrentThread.CurrentCulture = currentCulture;
            }
        }
 public virtual void ShouldUseCultureDuringFormatting()
 {
     OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
     CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;
     try
     {
         Thread.CurrentThread.CurrentCulture = new CultureInfo("ko-KR");
         string formatted = strategy.FormatTime(new DateTime(1900, 1, 1, 5, 5, 5), new ShortTimeFormat());
         Assert.AreEqual("오전 5:05", formatted);
     }
     finally
     {
         Thread.CurrentThread.CurrentCulture = currentCulture;
     }
 }
 public virtual void ShouldUseCultureSpecificTimeDesignators()
 {
     OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
     CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;
     try
     {
         Thread.CurrentThread.CurrentCulture = new CultureInfo("ko-KR");
         Assert.AreEqual("오전", strategy.AMDesignator);
         Assert.AreEqual("오후", strategy.PMDesignator);
     }
     finally
     {
         Thread.CurrentThread.CurrentCulture = currentCulture;
     }
 }
 public virtual void ShouldAllowSpecificCharactersInFormats()
 {
     OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
     Assert.AreEqual("hh:mm.ss", strategy.GetTransformedFormat("hh:mm.ss zzzz"));
 }
        public virtual void ShouldDetermineTextPositionInDateTime()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
            CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;

            string date = "04:12:22";
            ITimeFormat military = new CustomTimeFormat("HH:mm:ss");

            Assert.AreEqual(0, strategy.GetTextPositionForTimeUnit(date, TimeSpan.FromHours(1), military));
            Assert.AreEqual(3, strategy.GetTextPositionForTimeUnit(date, TimeSpan.FromMinutes(10), military));
            Assert.AreEqual(4, strategy.GetTextPositionForTimeUnit(date, TimeSpan.FromMinutes(1), military));
            Assert.AreEqual(6, strategy.GetTextPositionForTimeUnit(date, TimeSpan.FromSeconds(10), military));
            Assert.AreEqual(7, strategy.GetTextPositionForTimeUnit(date, TimeSpan.FromSeconds(1), military));

            try
            {
                Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
                date = "4:12:22 PM";
                ITimeFormat longFormat = new LongTimeFormat();

                Assert.AreEqual(0, strategy.GetTextPositionForTimeUnit(date, TimeSpan.FromHours(1), longFormat));
                Assert.AreEqual(8, strategy.GetTextPositionForTimeUnit(date, TimeSpan.FromHours(12), longFormat));
                Assert.AreEqual(8, strategy.GetTextPositionForTimeUnit(date, TimeSpan.FromHours(12), longFormat));
            }
            finally
            {
                Thread.CurrentThread.CurrentCulture = currentCulture;
            }
        }
 public virtual void ShouldThrowExceptionDuringDeterminingTimeUnit()
 {
     OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
     strategy.ParseTime("4:12:22 AM", null, null);
 }
        public virtual void ShouldUseTimeUnitClosestAtCaretWhenAtWhiteSpace()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
            CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;

            try
            {
                Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
                string date = "4:12   PM";
                ITimeFormat longFormat = new CustomTimeFormat("h:mm   tt");

                Assert.AreEqual(TimeSpan.FromMinutes(1), strategy.GetTimeUnitAtTextPosition(date, 4, longFormat));
                Assert.AreEqual(TimeSpan.FromMinutes(1), strategy.GetTimeUnitAtTextPosition(date, 5, longFormat));
                Assert.AreEqual(TimeSpan.FromHours(12), strategy.GetTimeUnitAtTextPosition(date, 6, longFormat));
                Assert.AreEqual(TimeSpan.FromHours(12), strategy.GetTimeUnitAtTextPosition(date, 7, longFormat));
            }
            finally
            {
                Thread.CurrentThread.CurrentCulture = currentCulture;
            }
        }
        public virtual void ShouldHaveCatchallParser()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();

            Assert.IsTrue(strategy.GetActualTimeParsers(null).Count() == 1);
        }
 public virtual void ShouldThrowExceptionDuringParseIfFormatIsNull()
 {
     OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
     strategy.ParseTime("4:12 AM", null, null);
 }
 public virtual void ShouldThrowExceptionDuringParse()
 {
     OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
     strategy.ParseTime("cannot parse this", new LongTimeFormat(), null);
 }
        public virtual void ShouldParseTextToDateTime()
        {
            // culture is internal, need to test with a known culture.
            CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;

            try
            {
                Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
                OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
                Assert.IsTrue(strategy.ActualCulture.Name == "en-US", "This test should run under en-US culture, setting did not work as expected.");

                TimeParserCollection parsers = new TimeParserCollection { new CustomTimeParser() };

                Assert.AreEqual(DateTime.Today.Date.AddHours(8).AddMinutes(30), strategy.ParseTime("8:30 AM", new ShortTimeFormat(), parsers));
                Assert.AreEqual(DateTime.Today.Date.AddHours(20).AddMinutes(30), strategy.ParseTime("8:30 PM", new ShortTimeFormat(), parsers));

                Assert.AreEqual(DateTime.Today.Date.AddHours(8).AddMinutes(30).AddSeconds(12), strategy.ParseTime("8:30:12 AM", new LongTimeFormat(), parsers));
                Assert.AreEqual(DateTime.Today.Date.AddHours(20).AddMinutes(30).AddSeconds(12), strategy.ParseTime("8:30:12 PM", new LongTimeFormat(), parsers));

                Assert.AreEqual(DateTime.Today.Date.AddHours(8).AddMinutes(30).AddSeconds(12), strategy.ParseTime("08:30:12", new CustomTimeFormat("hh:mm:ss"), parsers));

                Assert.AreEqual(DateTime.MinValue.Date.AddHours(15).AddMinutes(40), strategy.ParseTime("3 uur 40", new CustomTimeFormat("hh:mm:ss"), parsers));
            }
            finally
            {
                Thread.CurrentThread.CurrentCulture = currentCulture;
            }
        }
        public virtual void ShouldThrowExceptionDuringParse()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();

            strategy.ParseTime("cannot parse this", new LongTimeFormat(), null);
        }
        public virtual void ShouldThrowExceptionDuringParseIfFormatIsNull()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();

            strategy.ParseTime("4:12 AM", null, null);
        }
        public virtual void ShouldThrowExceptionDuringDeterminingTimeUnit()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();

            strategy.ParseTime("4:12:22 AM", null, null);
        }
        public virtual void ShouldHaveCatchallParser()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();

            Assert.IsTrue(strategy.GetActualTimeParsers(null).Count() == 1);
        }
        public virtual void ShouldDetermineTimeUnitAtPositionsInString()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
            CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;

            string date = "04:12:22";
            ITimeFormat military = new CustomTimeFormat("HH:mm:ss");

            Assert.AreEqual(TimeSpan.FromHours(1), strategy.GetTimeUnitAtTextPosition(date, 0, military));
            Assert.AreEqual(TimeSpan.FromHours(1), strategy.GetTimeUnitAtTextPosition(date, 1, military));
            Assert.AreEqual(TimeSpan.FromHours(1), strategy.GetTimeUnitAtTextPosition(date, 2, military));
            Assert.AreEqual(TimeSpan.FromMinutes(10), strategy.GetTimeUnitAtTextPosition(date, 3, military));
            Assert.AreEqual(TimeSpan.FromMinutes(1), strategy.GetTimeUnitAtTextPosition(date, 4, military));
            Assert.AreEqual(TimeSpan.FromMinutes(1), strategy.GetTimeUnitAtTextPosition(date, 5, military));
            Assert.AreEqual(TimeSpan.FromSeconds(10), strategy.GetTimeUnitAtTextPosition(date, 6, military));
            Assert.AreEqual(TimeSpan.FromSeconds(1), strategy.GetTimeUnitAtTextPosition(date, 7, military));
            Assert.AreEqual(TimeSpan.FromSeconds(1), strategy.GetTimeUnitAtTextPosition(date, 8, military));

            try
            {
                Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
                date = "4:12:22 PM";
                ITimeFormat longFormat = new LongTimeFormat();

                Assert.AreEqual(TimeSpan.FromHours(1), strategy.GetTimeUnitAtTextPosition(date, 0, longFormat));
                Assert.AreEqual(TimeSpan.FromSeconds(1), strategy.GetTimeUnitAtTextPosition(date, 7, longFormat));
                Assert.AreEqual(TimeSpan.FromHours(12), strategy.GetTimeUnitAtTextPosition(date, 8, longFormat));
                Assert.AreEqual(TimeSpan.FromHours(12), strategy.GetTimeUnitAtTextPosition(date, 9, longFormat));
                Assert.AreEqual(TimeSpan.FromHours(12), strategy.GetTimeUnitAtTextPosition(date, 10, longFormat));
            }
            finally
            {
                Thread.CurrentThread.CurrentCulture = currentCulture;
            }
        }
 public virtual void ShouldValidateTimeFormatWhenFormatting()
 {
     OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
     strategy.FormatTime(DateTime.Now, null);
 }
        public virtual void ShouldAllowSpecificCharactersInFormats()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();

            Assert.AreEqual("hh:mm.ss", strategy.GetTransformedFormat("hh:mm.ss zzzz"));
        }
        public virtual void ShouldFormatDateTimeWithFilter()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();
            CultureInfo currentCulture = Thread.CurrentThread.CurrentCulture;

            try
            {
                Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
                Assert.AreEqual("8 AM", strategy.FormatTime(new DateTime(1900, 2, 3, 8, 3, 12), new ShortTimeFormat(), 'H', 'h', 't', ' '));
                Assert.AreEqual("03", strategy.FormatTime(new DateTime(1900, 2, 3, 8, 3, 12), new LongTimeFormat(), 'm'));

                Thread.CurrentThread.CurrentCulture = new CultureInfo("nl-NL");
                Assert.IsTrue(strategy.FormatTime(new DateTime(1900, 2, 3, 8, 3, 12), new ShortTimeFormat(), 'H', 'h', 't', ' ').EndsWith("8", StringComparison.Ordinal));
                Assert.AreEqual("03", strategy.FormatTime(new DateTime(1900, 2, 3, 8, 3, 12), new LongTimeFormat(), 'm'));
            }
            finally
            {
                Thread.CurrentThread.CurrentCulture = currentCulture;
            }
        }
        public virtual void ShouldValidateTimeFormatWhenFormatting()
        {
            OverriddenTimeGlobalizationInfo strategy = new OverriddenTimeGlobalizationInfo();

            strategy.FormatTime(DateTime.Now, null);
        }