public void FixedFormatTimeTests() { DateTime[] boundaries = { DateTime.MinValue, DateTime.MaxValue, new DateTime(2009, 6, 25, 0, 0, 0, 0, DateTimeKind.Utc), new DateTime(2009, 6, 25, 23, 59, 59, 999, DateTimeKind.Utc), new DateTime(2009, 6, 25, 12, 0, 35, 500, DateTimeKind.Utc), new DateTime(2009, 6, 25, 11, 59, 0, 0, DateTimeKind.Utc), new DateTime(2009, 6, 25, 1, 21, 4, 44, DateTimeKind.Utc), new DateTime(2009, 6, 25, 10, 3, 48, 5, DateTimeKind.Utc), new DateTime(2009, 6, 25, 5, 4, 3, 2, DateTimeKind.Utc), }; foreach (var date in boundaries) { Assert.AreEqual( date.ToString("HH:mm:ss.fff"), TextFormatter.FormatFixedTime(date), string.Format("Time formats differed using the fixed for date: {0}.", date)); } }