Skip to content

Commit 6759d6f

Browse files
committed
add test cases
1 parent 6938c6a commit 6759d6f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Smdn.Reflection.ReverseGenerating.ListApi/Smdn.Reflection.ReverseGenerating.ListApi/RootCommandImplementation.GetApiListWriterOptions.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,15 @@ public void GetApiListWriterOptions_GenerateStaticMembersFirst(string args, bool
5858

5959
Assert.AreEqual(expected, options.Writer.OrderStaticMembersFirst, $"args='{args}'");
6060
}
61+
62+
[TestCase("--generate-nullableannotations", true)]
63+
[TestCase("--generate-nullableannotations=true", true)]
64+
[TestCase("--generate-nullableannotations=false", false)]
65+
[TestCase("", true)]
66+
public void GetApiListWriterOptions_GenerateNullableAnnotations(string args, bool expected)
67+
{
68+
var options = GetApiListWriterOptions(args);
69+
70+
Assert.AreEqual(expected, options.Writer.WriteNullableAnnotationDirective, $"args='{args}'");
71+
}
6172
}

0 commit comments

Comments
 (0)