Beispiel #1
0
 public void With_Valid_String_Using_Single_Format()
 => ResultParsers
 .DateTimeExact(
     System.DateTime.Today.ToString(Format),
     Format,
     DateTimeStyles.None,
     CultureInfo.CurrentCulture
     )
 .AssertValue(System.DateTime.Today);
Beispiel #2
0
 public void With_Valid_String_Using_Multiple_Formats()
 => ResultParsers
 .DateTimeExact(
     System.DateTime.Today.ToString(CultureInfo.InvariantCulture),
     Formats,
     DateTimeStyles.None,
     CultureInfo.CurrentCulture
     )
 .AssertValue(System.DateTime.Today);
Beispiel #3
0
 public void With_Null_String_Using_Single_Format()
 => ResultParsers
 .DateTimeExact(
     null,
     Format,
     DateTimeStyles.None,
     CultureInfo.InvariantCulture
     )
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <System.DateTime>(
         null
         )
     );
Beispiel #4
0
 public void With_Invalid_String_Using_Multiple_Formats()
 => ResultParsers
 .DateTimeExact(
     "foobar",
     Formats,
     DateTimeStyles.None,
     CultureInfo.InvariantCulture
     )
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <System.DateTime>(
         "foobar"
         )
     );