Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configured_endpoints: 238
openapi_spec_hash: fa67b808ca579e929aea7dd917b18cf9
openapi_spec_hash: 7f33ff43b4b498d0954b28032669a1a6
config_hash: 2ae0d8aaecf01b38cbf9f9e112822c23
2 changes: 1 addition & 1 deletion scripts/mock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public void FieldRoundtrip_Works()
Address = new()
{
City = "New York",
Line1 = "33 Liberty Street",
Country = "US",
Line1 = "33 Liberty Street",
Line2 = "x",
State = "NY",
Zip = "10045",
Expand Down Expand Up @@ -66,8 +66,8 @@ public void FieldRoundtrip_Works()
Address = new()
{
City = "New York",
Line1 = "33 Liberty Street",
Country = "US",
Line1 = "33 Liberty Street",
Line2 = "x",
State = "NY",
Zip = "10045",
Expand Down Expand Up @@ -126,8 +126,8 @@ public void OptionalNonNullableParamsUnsetAreNotSet_Works()
Address = new()
{
City = "New York",
Line1 = "33 Liberty Street",
Country = "US",
Line1 = "33 Liberty Street",
Line2 = "x",
State = "NY",
Zip = "10045",
Expand Down Expand Up @@ -180,8 +180,8 @@ public void OptionalNonNullableParamsSetToNullAreNotSet_Works()
Address = new()
{
City = "New York",
Line1 = "33 Liberty Street",
Country = "US",
Line1 = "33 Liberty Street",
Line2 = "x",
State = "NY",
Zip = "10045",
Expand Down Expand Up @@ -237,8 +237,8 @@ public void Url_Works()
Address = new()
{
City = "New York",
Line1 = "33 Liberty Street",
Country = "US",
Line1 = "33 Liberty Street",
Line2 = "x",
State = "NY",
Zip = "10045",
Expand Down Expand Up @@ -294,8 +294,8 @@ public void CopyConstructor_Works()
Address = new()
{
City = "New York",
Line1 = "33 Liberty Street",
Country = "US",
Line1 = "33 Liberty Street",
Line2 = "x",
State = "NY",
Zip = "10045",
Expand Down Expand Up @@ -350,8 +350,8 @@ public void FieldRoundtrip_Works()
Address = new()
{
City = "x",
Line1 = "x",
Country = "x",
Line1 = "x",
Line2 = "x",
State = "x",
Zip = "x",
Expand Down Expand Up @@ -390,8 +390,8 @@ public void FieldRoundtrip_Works()
Address expectedAddress = new()
{
City = "x",
Line1 = "x",
Country = "x",
Line1 = "x",
Line2 = "x",
State = "x",
Zip = "x",
Expand Down Expand Up @@ -441,8 +441,8 @@ public void SerializationRoundtrip_Works()
Address = new()
{
City = "x",
Line1 = "x",
Country = "x",
Line1 = "x",
Line2 = "x",
State = "x",
Zip = "x",
Expand Down Expand Up @@ -495,8 +495,8 @@ public void FieldRoundtripThroughSerialization_Works()
Address = new()
{
City = "x",
Line1 = "x",
Country = "x",
Line1 = "x",
Line2 = "x",
State = "x",
Zip = "x",
Expand Down Expand Up @@ -542,8 +542,8 @@ public void FieldRoundtripThroughSerialization_Works()
Address expectedAddress = new()
{
City = "x",
Line1 = "x",
Country = "x",
Line1 = "x",
Line2 = "x",
State = "x",
Zip = "x",
Expand Down Expand Up @@ -593,8 +593,8 @@ public void Validation_Works()
Address = new()
{
City = "x",
Line1 = "x",
Country = "x",
Line1 = "x",
Line2 = "x",
State = "x",
Zip = "x",
Expand Down Expand Up @@ -641,8 +641,8 @@ public void OptionalNonNullablePropertiesUnsetAreNotSet_Works()
Address = new()
{
City = "x",
Line1 = "x",
Country = "x",
Line1 = "x",
Line2 = "x",
State = "x",
Zip = "x",
Expand Down Expand Up @@ -689,8 +689,8 @@ public void OptionalNonNullablePropertiesUnsetValidation_Works()
Address = new()
{
City = "x",
Line1 = "x",
Country = "x",
Line1 = "x",
Line2 = "x",
State = "x",
Zip = "x",
Expand Down Expand Up @@ -736,8 +736,8 @@ public void OptionalNonNullablePropertiesSetToNullAreNotSet_Works()
Address = new()
{
City = "x",
Line1 = "x",
Country = "x",
Line1 = "x",
Line2 = "x",
State = "x",
Zip = "x",
Expand Down Expand Up @@ -787,8 +787,8 @@ public void OptionalNonNullablePropertiesSetToNullValidation_Works()
Address = new()
{
City = "x",
Line1 = "x",
Country = "x",
Line1 = "x",
Line2 = "x",
State = "x",
Zip = "x",
Expand Down Expand Up @@ -837,8 +837,8 @@ public void CopyConstructor_Works()
Address = new()
{
City = "x",
Line1 = "x",
Country = "x",
Line1 = "x",
Line2 = "x",
State = "x",
Zip = "x",
Expand Down Expand Up @@ -888,23 +888,23 @@ public void FieldRoundtrip_Works()
var model = new Address
{
City = "x",
Line1 = "x",
Country = "x",
Line1 = "x",
Line2 = "x",
State = "x",
Zip = "x",
};

string expectedCity = "x";
string expectedLine1 = "x";
string expectedCountry = "x";
string expectedLine1 = "x";
string expectedLine2 = "x";
string expectedState = "x";
string expectedZip = "x";

Assert.Equal(expectedCity, model.City);
Assert.Equal(expectedLine1, model.Line1);
Assert.Equal(expectedCountry, model.Country);
Assert.Equal(expectedLine1, model.Line1);
Assert.Equal(expectedLine2, model.Line2);
Assert.Equal(expectedState, model.State);
Assert.Equal(expectedZip, model.Zip);
Expand All @@ -916,8 +916,8 @@ public void SerializationRoundtrip_Works()
var model = new Address
{
City = "x",
Line1 = "x",
Country = "x",
Line1 = "x",
Line2 = "x",
State = "x",
Zip = "x",
Expand All @@ -935,8 +935,8 @@ public void FieldRoundtripThroughSerialization_Works()
var model = new Address
{
City = "x",
Line1 = "x",
Country = "x",
Line1 = "x",
Line2 = "x",
State = "x",
Zip = "x",
Expand All @@ -950,15 +950,15 @@ public void FieldRoundtripThroughSerialization_Works()
Assert.NotNull(deserialized);

string expectedCity = "x";
string expectedLine1 = "x";
string expectedCountry = "x";
string expectedLine1 = "x";
string expectedLine2 = "x";
string expectedState = "x";
string expectedZip = "x";

Assert.Equal(expectedCity, deserialized.City);
Assert.Equal(expectedLine1, deserialized.Line1);
Assert.Equal(expectedCountry, deserialized.Country);
Assert.Equal(expectedLine1, deserialized.Line1);
Assert.Equal(expectedLine2, deserialized.Line2);
Assert.Equal(expectedState, deserialized.State);
Assert.Equal(expectedZip, deserialized.Zip);
Expand All @@ -970,8 +970,8 @@ public void Validation_Works()
var model = new Address
{
City = "x",
Line1 = "x",
Country = "x",
Line1 = "x",
Line2 = "x",
State = "x",
Zip = "x",
Expand All @@ -983,10 +983,13 @@ public void Validation_Works()
[Fact]
public void OptionalNonNullablePropertiesUnsetAreNotSet_Works()
{
var model = new Address { City = "x", Line1 = "x" };
var model = new Address
{
City = "x",
Country = "x",
Line1 = "x",
};

Assert.Null(model.Country);
Assert.False(model.RawData.ContainsKey("country"));
Assert.Null(model.Line2);
Assert.False(model.RawData.ContainsKey("line2"));
Assert.Null(model.State);
Expand All @@ -998,7 +1001,12 @@ public void OptionalNonNullablePropertiesUnsetAreNotSet_Works()
[Fact]
public void OptionalNonNullablePropertiesUnsetValidation_Works()
{
var model = new Address { City = "x", Line1 = "x" };
var model = new Address
{
City = "x",
Country = "x",
Line1 = "x",
};

model.Validate();
}
Expand All @@ -1009,17 +1017,15 @@ public void OptionalNonNullablePropertiesSetToNullAreNotSet_Works()
var model = new Address
{
City = "x",
Country = "x",
Line1 = "x",

// Null should be interpreted as omitted for these properties
Country = null,
Line2 = null,
State = null,
Zip = null,
};

Assert.Null(model.Country);
Assert.False(model.RawData.ContainsKey("country"));
Assert.Null(model.Line2);
Assert.False(model.RawData.ContainsKey("line2"));
Assert.Null(model.State);
Expand All @@ -1034,10 +1040,10 @@ public void OptionalNonNullablePropertiesSetToNullValidation_Works()
var model = new Address
{
City = "x",
Country = "x",
Line1 = "x",

// Null should be interpreted as omitted for these properties
Country = null,
Line2 = null,
State = null,
Zip = null,
Expand All @@ -1052,8 +1058,8 @@ public void CopyConstructor_Works()
var model = new Address
{
City = "x",
Line1 = "x",
Country = "x",
Line1 = "x",
Line2 = "x",
State = "x",
Zip = "x",
Expand Down
Loading