Skip to content

Commit

Permalink
Unit test to show XmlCommentsSchemaFilter does not treat nullable str…
Browse files Browse the repository at this point in the history
…ing properties with null values correctly
  • Loading branch information
mpdunlop committed Jun 29, 2021
1 parent babad77 commit b8dcad3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ public class XmlAnnotatedType
/// <example>d3966535-2637-48fa-b911-e3c27405ee09</example>
public Guid GuidProperty { get; set; }

/// <summary>
/// Summary for Nullable StringProperty
/// </summary>
/// <example>null</example>
public string NullableStringProperty { get; set; }

/// <summary>
/// Summary for StringProperty
/// </summary>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public void Apply_SetsDescription_FromPropertySummaryTag(
[InlineData(typeof(XmlAnnotatedType), nameof(XmlAnnotatedType.GuidProperty), "string", "\"d3966535-2637-48fa-b911-e3c27405ee09\"")]
[InlineData(typeof(XmlAnnotatedType), nameof(XmlAnnotatedType.StringProperty), "string", "\"Example for StringProperty\"")]
[InlineData(typeof(XmlAnnotatedType), nameof(XmlAnnotatedType.ObjectProperty), "object", "{\n \"prop1\": 1,\n \"prop2\": \"foobar\"\n}")]
[InlineData(typeof(XmlAnnotatedType), nameof(XmlAnnotatedType.NullableStringProperty), "string", "null")]
[UseInvariantCulture]
public void Apply_SetsExample_FromPropertyExampleTag(
Type declaringType,
Expand Down

0 comments on commit b8dcad3

Please sign in to comment.