public static void GetDateTimeFormats_FormatSpecifier_InvalidFormat() { var dateTime = new DateTime(2009, 7, 28, 5, 23, 15); Assert.Throws<FormatException>(() => dateTime.GetDateTimeFormats('x')); // No such format }