public void TestGeneralTimeSpanConversion()
        {
            var converter = new TimeSpanConverter();

            Assert.Null(converter.ConvertFromString("", CULTURE, typeof(TimeSpan?)));
            Assert.Throws <FormatException>(() => converter.ConvertFromString("", CULTURE, typeof(TimeSpan)));
            Assert.AreEqual(new TimeSpan(1, 2, 3, 4), converter.ConvertFromString("01:02:03:04", CULTURE, typeof(TimeSpan)));
            Assert.AreEqual(new TimeSpan(2, 3, 4), converter.ConvertFromString("02:03:04", CULTURE, typeof(TimeSpan)));
        }
        public void TestTimespanConversionWithFormat()
        {
            var converter = new TimeSpanConverter(@"hh\-mm\-ss");

            Assert.AreEqual(new TimeSpan(3, 15, 22), converter.ConvertFromString("03-15-22", CULTURE, typeof(TimeSpan)));

            converter = new TimeSpanConverter(@"hh'h 'mm'm 'ss's'");
            Assert.AreEqual(new TimeSpan(2, 12, 37), converter.ConvertFromString("02h 12m 37s", CULTURE, typeof(TimeSpan)));

            converter = new TimeSpanConverter(@"h'ч 'm'мин 's'сек'");
            Assert.AreEqual(new TimeSpan(2, 12, 8), converter.ConvertFromString("2ч 12мин 8сек", CULTURE, typeof(TimeSpan)));
        }