Skip to content

Commit

Permalink
Add NullableBool parameterized test to TermResolverTests.FromString
Browse files Browse the repository at this point in the history
  • Loading branch information
YevgeniyShunevych committed Oct 12, 2022
1 parent 0db4c87 commit a949b2f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/Atata.UnitTests/Terms/TermResolverTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ public enum TermCasedOption
MidSentenceUsingTerm
}

[TestCase("true", ExpectedResult = true)]
[TestCase("True", ExpectedResult = true)]
[TestCase("false", ExpectedResult = false)]
[TestCase("False", ExpectedResult = false)]
[TestCase("", ExpectedResult = null)]
[TestCase(null, ExpectedResult = null)]
public bool? NullableBool(string value) =>
TermResolver.FromString<bool?>(value);

[TestCaseSource(typeof(TermResolverFormatTestCaseSource))]
public void WithFormat(object value, string format, string expectedFormattedValue)
{
Expand Down

0 comments on commit a949b2f

Please sign in to comment.