public void ParseExactFormatSpecifiersTest() { foreach (KeyValuePair <KeyValuePair <string, string>, WeekDate> weekDateByFormat in WeekDatesByFormats) { Assert.AreEqual( weekDateByFormat.Value, WeekDate.ParseExact(weekDateByFormat.Key.Value, weekDateByFormat.Key.Key), $"Format: {weekDateByFormat.Key.Key}; String: {weekDateByFormat.Key.Value}"); Assert.AreEqual( weekDateByFormat.Value, WeekDate.ParseExact(weekDateByFormat.Key.Value, WeekDate.Formats[weekDateByFormat.Key.Key]), $"Format: {WeekDate.Formats[weekDateByFormat.Key.Key]}; String: {weekDateByFormat.Key.Value}"); } }
public void ParseExactInvalidFormatStringTest() { WeekDate.ParseExact("2019-W10-1", DateTimeFormatInfo.InvariantInfo.FullDateTimePattern); }
public void ParseExactEmptyFormatStringTest() { WeekDate.ParseExact("2019-W10-1", string.Empty); }
public void ParseExactEmptySourceStringTest() { WeekDate.ParseExact(string.Empty, "d"); }
public void ParseExactNullFormatStringTest() { WeekDate.ParseExact("2019-W10-1", null); }
public void ParseExactNullSourceStringTest() { WeekDate.ParseExact(null, "d"); }