Beispiel #1
0
 public void With_Null_String()
 => ResultParsers
 .Long(null)
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <long>(
         null
         )
     );
Beispiel #2
0
 public void With_Invalid_String()
 => ResultParsers
 .Enum <AssertionUtilities.Gender>("foobar")
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <AssertionUtilities.Gender>(
         "foobar"
         )
     );
Beispiel #3
0
 public void With_Null_String()
 => ResultParsers
 .Decimal(null)
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <decimal>(
         null
         )
     );
Beispiel #4
0
 public void With_Null_String()
 => ResultParsers
 .Enum <AssertionUtilities.Gender>(null)
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <AssertionUtilities.Gender>(
         null
         )
     );
Beispiel #5
0
 public void With_Valid_String_With_Ignore_Case_Set_To_False()
 => ResultParsers
 .Enum <AssertionUtilities.Gender>("malE", false)
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <AssertionUtilities.Gender>(
         "malE"
         )
     );
Beispiel #6
0
 public void With_Null_String_With_DateTimeStyle()
 => ResultParsers
 .DateTime(null, DateTimeStyles.None, CultureInfo.InvariantCulture)
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <System.DateTime>(
         null
         )
     );
Beispiel #7
0
 public void With_Invalid_String()
 => ResultParsers
 .DateTime("foobar")
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <System.DateTime>(
         "foobar"
         )
     );
Beispiel #8
0
 public void With_Invalid_String()
 => ResultParsers
 .Long("foobar")
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <long>(
         "foobar"
         )
     );
Beispiel #9
0
 public void With_Null_String()
 => ResultParsers
 .DateTime(null)
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <System.DateTime>(
         null
         )
     );
Beispiel #10
0
        public void With_Invalid_String_Digits_With_Hyphens_Wrapped_In_Parentheses()
        {
            var guid = "foobar";

            ResultParsers
            .GuidExact(guid, GuidFormat.DigitsWithHyphensWrappedInParentheses)
            .AssertError(AssertionUtilities.FormatStringParserMessage <Guid>("foobar"));
        }
Beispiel #11
0
 public void With_Null_String_With_NumberStyle()
 => ResultParsers
 .Long(null, NumberStyles.Any, CultureInfo.InvariantCulture)
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <long>(
         null
         )
     );
Beispiel #12
0
 public void With_Invalid_String_With_NumberStyle()
 => ResultParsers
 .Double("foobar", NumberStyles.Any, CultureInfo.InvariantCulture)
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <double>(
         "foobar"
         )
     );
Beispiel #13
0
 public void With_Invalid_String_Using_Single_Format()
 => ResultParsers
 .DateTimeExact(
     "foobar",
     Format,
     DateTimeStyles.None,
     CultureInfo.InvariantCulture
     )
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <System.DateTime>(
         "foobar"
         )
     );
Beispiel #14
0
 public void With_Null_String_Using_Multiple_Formats()
 => ResultParsers
 .DateTimeExact(
     null,
     Formats,
     DateTimeStyles.None,
     CultureInfo.InvariantCulture
     )
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <System.DateTime>(
         null
         )
     );
Beispiel #15
0
 public void With_Invalid_String_Digits_Only() =>
 ResultParsers
 .GuidExact("foobar", GuidFormat.DigitsOnly)
 .AssertError(AssertionUtilities.FormatStringParserMessage <Guid>("foobar"));
Beispiel #16
0
 public void With_Null_String_Digits_With_Hyphens_Wrapped_In_Parentheses() =>
 ResultParsers
 .GuidExact(null, GuidFormat.DigitsWithHyphensWrappedInParentheses)
 .AssertError(AssertionUtilities.FormatStringParserMessage <Guid>(null));
Beispiel #17
0
 public void With_Null_String_Digits_With_Four_HexaDecimals() =>
 ResultParsers
 .GuidExact(null, GuidFormat.FourHexadecimalWrappedInBrackets)
 .AssertError(AssertionUtilities.FormatStringParserMessage <Guid>(null));
Beispiel #18
0
 public void With_Null_String_Digits_Only() =>
 ResultParsers
 .GuidExact(null, GuidFormat.DigitsOnly)
 .AssertError(AssertionUtilities.FormatStringParserMessage <Guid>(null));