Пример #1
0
 public void With_Invalid_String()
 => ResultParsers
 .Enum <AssertionUtilities.Gender>("foobar")
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <AssertionUtilities.Gender>(
         "foobar"
         )
     );
Пример #2
0
 public void With_Valid_String_With_Ignore_Case_Set_To_False()
 => ResultParsers
 .Enum <AssertionUtilities.Gender>("malE", false)
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <AssertionUtilities.Gender>(
         "malE"
         )
     );
Пример #3
0
 public void With_Null_String()
 => ResultParsers
 .Enum <AssertionUtilities.Gender>(null)
 .AssertError(
     AssertionUtilities.FormatStringParserMessage <AssertionUtilities.Gender>(
         null
         )
     );
Пример #4
0
 public void With_Valid_String_With_Ignore_Case()
 => ResultParsers
 .Enum <AssertionUtilities.Gender>("malE", true)
 .AssertValue(AssertionUtilities.Gender.Male);
Пример #5
0
 public void With_Valid_String()
 => ResultParsers
 .Enum <AssertionUtilities.Gender>("Male")
 .AssertValue(AssertionUtilities.Gender.Male);