public void ToString_FormatStringNull_ReturnsIso8601Format()
        {
            var    quarterHour = new QuarterHour(2020, 1, 20, 9, 30);
            string formatted   = quarterHour.ToString((string)null);

            Assert.AreEqual("2020-01-20 09:30", formatted);
        }
        public void ToString_CustomFormatString_AsExpected()
        {
            var    quarterHour = new QuarterHour(2020, 1, 20, 9, 30);
            string formatted   = quarterHour.ToString("yyyy M d");

            Assert.AreEqual("2020 1 20", formatted);
        }
        public void ToString_NullFormatStringAndFormatProvider_AsExpected()
        {
            var                quarterHour    = new QuarterHour(2020, 1, 20, 9, 0);
            CultureInfo        culture        = CultureInfo.CreateSpecificCulture("en-UK");
            DateTimeFormatInfo dateTimeFormat = culture.DateTimeFormat;

            dateTimeFormat.TimeSeparator = ".";
            string formatted = quarterHour.ToString(null, dateTimeFormat);

            Assert.AreEqual("2020-01-20 09.00", formatted);
        }
        public void ToString_FormatProviderWithDotTimeSeparator_TextWithDotTimeSeparator()
        {
            var                quarterHour    = new QuarterHour(2020, 1, 20, 9, 0);
            CultureInfo        culture        = CultureInfo.CreateSpecificCulture("en-UK");
            DateTimeFormatInfo dateTimeFormat = culture.DateTimeFormat;

            dateTimeFormat.TimeSeparator = ".";
            string formatted = quarterHour.ToString(dateTimeFormat);

            Assert.AreEqual("2020-01-20 09.00", formatted);
        }