Exemplo n.º 1
0
 public void With_Null_String()
 => ResultParsers
 .Long(null)
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <long>(
         null
         )
     );
Exemplo n.º 2
0
 public void With_Invalid_String()
 => ResultParsers
 .Enum <AssertionUtilities.Gender>("foobar")
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <AssertionUtilities.Gender>(
         "foobar"
         )
     );
Exemplo n.º 3
0
 public void With_Null_String()
 => ResultParsers
 .Decimal(null)
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <decimal>(
         null
         )
     );
Exemplo n.º 4
0
 public void With_Null_String()
 => ResultParsers
 .Enum <AssertionUtilities.Gender>(null)
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <AssertionUtilities.Gender>(
         null
         )
     );
Exemplo n.º 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"
         )
     );
Exemplo n.º 6
0
 public void With_Null_String_With_DateTimeStyle()
 => ResultParsers
 .DateTime(null, DateTimeStyles.None, CultureInfo.InvariantCulture)
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <System.DateTime>(
         null
         )
     );
Exemplo n.º 7
0
 public void With_Invalid_String()
 => ResultParsers
 .DateTime("foobar")
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <System.DateTime>(
         "foobar"
         )
     );
Exemplo n.º 8
0
 public void With_Invalid_String()
 => ResultParsers
 .Long("foobar")
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <long>(
         "foobar"
         )
     );
Exemplo n.º 9
0
 public void With_Null_String()
 => ResultParsers
 .DateTime(null)
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <System.DateTime>(
         null
         )
     );
Exemplo n.º 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"));
        }
Exemplo n.º 11
0
 public void With_Null_String_With_NumberStyle()
 => ResultParsers
 .Long(null, NumberStyles.Any, CultureInfo.InvariantCulture)
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <long>(
         null
         )
     );
Exemplo n.º 12
0
 public void With_Invalid_String_With_NumberStyle()
 => ResultParsers
 .Double("foobar", NumberStyles.Any, CultureInfo.InvariantCulture)
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <double>(
         "foobar"
         )
     );
Exemplo n.º 13
0
 public void With_Invalid_String_Using_Single_Format()
 => ResultParsers
 .DateTimeExact(
     "foobar",
     Format,
     DateTimeStyles.None,
     CultureInfo.InvariantCulture
     )
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <System.DateTime>(
         "foobar"
         )
     );
Exemplo n.º 14
0
 public void With_Null_String_Using_Multiple_Formats()
 => ResultParsers
 .DateTimeExact(
     null,
     Formats,
     DateTimeStyles.None,
     CultureInfo.InvariantCulture
     )
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <System.DateTime>(
         null
         )
     );
Exemplo n.º 15
0
 public void With_Invalid_String_Digits_Only() =>
 ResultParsers
 .GuidExact("foobar", GuidFormat.DigitsOnly)
 .AssertError(AssertionUtilities.FormatStringParserMessage <Guid>("foobar"));
Exemplo n.º 16
0
 public void With_Null_String_Digits_With_Hyphens_Wrapped_In_Parentheses() =>
 ResultParsers
 .GuidExact(null, GuidFormat.DigitsWithHyphensWrappedInParentheses)
 .AssertError(AssertionUtilities.FormatStringParserMessage <Guid>(null));
Exemplo n.º 17
0
 public void With_Null_String_Digits_With_Four_HexaDecimals() =>
 ResultParsers
 .GuidExact(null, GuidFormat.FourHexadecimalWrappedInBrackets)
 .AssertError(AssertionUtilities.FormatStringParserMessage <Guid>(null));
Exemplo n.º 18
0
 public void With_Null_String_Digits_Only() =>
 ResultParsers
 .GuidExact(null, GuidFormat.DigitsOnly)
 .AssertError(AssertionUtilities.FormatStringParserMessage <Guid>(null));