Skip to content

Commit 626481b

Browse files
authored
Add tests for serialization of special property names (#7544)
* add test for serialization of special propery name * comment out os dependent test
1 parent b7f5265 commit 626481b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ public void SpecialModelNameInstanceTest()
4949
[Fact]
5050
public void SpecialPropertyNameTest()
5151
{
52-
// TODO unit test for the property 'SpecialPropertyName'
52+
SpecialModelName s = new SpecialModelName();
53+
s.SpecialPropertyName = 123l;
54+
Assert.Equal("{\"$special[property.name]\":123}", JsonConvert.SerializeObject(s));
55+
// comment out the following as the result is OS-dependent
56+
//Assert.Equal("{\"$special[property.name]\":123}", s.ToJson());
5357
}
5458

5559
}

0 commit comments

Comments
 (0)