Upgrade test framework versions and fix test issues
This commit is contained in:
parent
7a7dc71164
commit
a7524e189d
|
|
@ -5,7 +5,7 @@
|
||||||
<JsonNetVersion>10.0.1</JsonNetVersion>
|
<JsonNetVersion>10.0.1</JsonNetVersion>
|
||||||
<MoqVersion>4.7.1</MoqVersion>
|
<MoqVersion>4.7.1</MoqVersion>
|
||||||
<NETStandardImplicitPackageVersion>$(BundledNETStandardPackageVersion)</NETStandardImplicitPackageVersion>
|
<NETStandardImplicitPackageVersion>$(BundledNETStandardPackageVersion)</NETStandardImplicitPackageVersion>
|
||||||
<TestSdkVersion>15.0.0</TestSdkVersion>
|
<TestSdkVersion>15.3.0-*</TestSdkVersion>
|
||||||
<XunitVersion>2.2.0</XunitVersion>
|
<XunitVersion>2.3.0-beta2-*</XunitVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Test.Dynamic
|
||||||
deserialized.ApplyTo(doc);
|
deserialized.ApplyTo(doc);
|
||||||
|
|
||||||
Assert.Equal("B", doc.StringProperty);
|
Assert.Equal("B", doc.StringProperty);
|
||||||
Assert.Equal(null, doc.SimpleDTO.AnotherStringProperty);
|
Assert.Null(doc.SimpleDTO.AnotherStringProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -121,7 +121,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Test.Dynamic
|
||||||
deserialized.ApplyTo(doc);
|
deserialized.ApplyTo(doc);
|
||||||
|
|
||||||
Assert.Equal("A", doc.Nested.AnotherStringProperty);
|
Assert.Equal("A", doc.Nested.AnotherStringProperty);
|
||||||
Assert.Equal(null, doc.Nested.StringProperty);
|
Assert.Null(doc.Nested.StringProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Test.Dynamic
|
||||||
deserialized.ApplyTo(doc);
|
deserialized.ApplyTo(doc);
|
||||||
|
|
||||||
Assert.Equal("A", doc.AnotherStringProperty);
|
Assert.Equal("A", doc.AnotherStringProperty);
|
||||||
Assert.Equal(null, doc.StringProperty);
|
Assert.Null(doc.StringProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Test.Dynamic
|
||||||
var deserialized = JsonConvert.DeserializeObject<JsonPatchDocument>(serialized);
|
var deserialized = JsonConvert.DeserializeObject<JsonPatchDocument>(serialized);
|
||||||
|
|
||||||
deserialized.ApplyTo(doc);
|
deserialized.ApplyTo(doc);
|
||||||
Assert.Equal(null, doc.SimpleDTO.StringProperty);
|
Assert.Null(doc.SimpleDTO.StringProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -184,7 +184,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Test.Dynamic
|
||||||
|
|
||||||
deserialized.ApplyTo(doc);
|
deserialized.ApplyTo(doc);
|
||||||
|
|
||||||
Assert.Equal(null, doc.SimpleDTO.StringProperty);
|
Assert.Null(doc.SimpleDTO.StringProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Test.Dynamic
|
||||||
|
|
||||||
deserialized.ApplyTo(doc);
|
deserialized.ApplyTo(doc);
|
||||||
|
|
||||||
Assert.Equal(null, doc.StringProperty);
|
Assert.Null(doc.StringProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -138,7 +138,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Test.Dynamic
|
||||||
|
|
||||||
deserialized.ApplyTo(doc);
|
deserialized.ApplyTo(doc);
|
||||||
|
|
||||||
Assert.Equal(null, doc.SimpleDTO.StringProperty);
|
Assert.Null(doc.SimpleDTO.StringProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Test.Dynamic
|
||||||
|
|
||||||
Assert.Equal(1, doc.SimpleDTO.DoubleValue);
|
Assert.Equal(1, doc.SimpleDTO.DoubleValue);
|
||||||
Assert.Equal(0, doc.SimpleDTO.IntegerValue);
|
Assert.Equal(0, doc.SimpleDTO.IntegerValue);
|
||||||
Assert.Equal(null, doc.SimpleDTO.IntegerList);
|
Assert.Null(doc.SimpleDTO.IntegerList);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Test.Dynamic
|
||||||
|
|
||||||
Assert.Equal(1, doc.SimpleDTO.DoubleValue);
|
Assert.Equal(1, doc.SimpleDTO.DoubleValue);
|
||||||
Assert.Equal(0, doc.SimpleDTO.IntegerValue);
|
Assert.Equal(0, doc.SimpleDTO.IntegerValue);
|
||||||
Assert.Equal(null, doc.SimpleDTO.IntegerList);
|
Assert.Null(doc.SimpleDTO.IntegerList);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ namespace Microsoft.AspNetCore.JsonPatch
|
||||||
|
|
||||||
// get path
|
// get path
|
||||||
var pathToCheck = deserialized.Operations.First().path;
|
var pathToCheck = deserialized.Operations.First().path;
|
||||||
Assert.Equal(pathToCheck, "/anothername");
|
Assert.Equal("/anothername", pathToCheck);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -82,7 +82,7 @@ namespace Microsoft.AspNetCore.JsonPatch
|
||||||
|
|
||||||
deserialized.ApplyTo(doc);
|
deserialized.ApplyTo(doc);
|
||||||
|
|
||||||
Assert.Equal(doc.AnotherName, "John");
|
Assert.Equal("John", doc.AnotherName);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -107,7 +107,7 @@ namespace Microsoft.AspNetCore.JsonPatch
|
||||||
|
|
||||||
deserialized.ApplyTo(doc);
|
deserialized.ApplyTo(doc);
|
||||||
|
|
||||||
Assert.Equal(doc.Name, "John");
|
Assert.Equal("John", doc.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -143,7 +143,7 @@ namespace Microsoft.AspNetCore.JsonPatch
|
||||||
|
|
||||||
deserialized.ApplyTo(doc);
|
deserialized.ApplyTo(doc);
|
||||||
|
|
||||||
Assert.Equal(null, doc.Name);
|
Assert.Null(doc.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -178,7 +178,7 @@ namespace Microsoft.AspNetCore.JsonPatch
|
||||||
|
|
||||||
// get path
|
// get path
|
||||||
var pathToCheck = deserialized.Operations.First().path;
|
var pathToCheck = deserialized.Operations.First().path;
|
||||||
Assert.Equal(pathToCheck, "/anothername");
|
Assert.Equal("/anothername", pathToCheck);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,4 @@
|
||||||
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
|
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -597,7 +597,7 @@ namespace Microsoft.AspNetCore.JsonPatch
|
||||||
patchDoc.ApplyTo(doc);
|
patchDoc.ApplyTo(doc);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Assert.Equal(null, doc.SimpleDTO.StringProperty);
|
Assert.Null(doc.SimpleDTO.StringProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -623,7 +623,7 @@ namespace Microsoft.AspNetCore.JsonPatch
|
||||||
deserialized.ApplyTo(doc);
|
deserialized.ApplyTo(doc);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Assert.Equal(null, doc.SimpleDTO.StringProperty);
|
Assert.Null(doc.SimpleDTO.StringProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -1796,7 +1796,7 @@ namespace Microsoft.AspNetCore.JsonPatch
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Assert.Equal("A", doc.SimpleDTO.AnotherStringProperty);
|
Assert.Equal("A", doc.SimpleDTO.AnotherStringProperty);
|
||||||
Assert.Equal(null, doc.SimpleDTO.StringProperty);
|
Assert.Null(doc.SimpleDTO.StringProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -1824,7 +1824,7 @@ namespace Microsoft.AspNetCore.JsonPatch
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Assert.Equal("A", doc.SimpleDTO.AnotherStringProperty);
|
Assert.Equal("A", doc.SimpleDTO.AnotherStringProperty);
|
||||||
Assert.Equal(null, doc.SimpleDTO.StringProperty);
|
Assert.Null(doc.SimpleDTO.StringProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -1858,7 +1858,7 @@ namespace Microsoft.AspNetCore.JsonPatch
|
||||||
Assert.Equal("C", doc.SimpleDTO.StringProperty);
|
Assert.Equal("C", doc.SimpleDTO.StringProperty);
|
||||||
Assert.Equal("D", doc.SimpleDTO.AnotherStringProperty);
|
Assert.Equal("D", doc.SimpleDTO.AnotherStringProperty);
|
||||||
Assert.Same(iDto, doc.SimpleDTO);
|
Assert.Same(iDto, doc.SimpleDTO);
|
||||||
Assert.Equal(null, doc.InheritedDTO);
|
Assert.Null(doc.InheritedDTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -1895,7 +1895,7 @@ namespace Microsoft.AspNetCore.JsonPatch
|
||||||
Assert.Equal("C", doc.SimpleDTO.StringProperty);
|
Assert.Equal("C", doc.SimpleDTO.StringProperty);
|
||||||
Assert.Equal("D", doc.SimpleDTO.AnotherStringProperty);
|
Assert.Equal("D", doc.SimpleDTO.AnotherStringProperty);
|
||||||
Assert.Same(iDto, doc.SimpleDTO);
|
Assert.Same(iDto, doc.SimpleDTO);
|
||||||
Assert.Equal(null, doc.InheritedDTO);
|
Assert.Null(doc.InheritedDTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
|
||||||
|
|
@ -377,7 +377,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters
|
||||||
patchDoc.ApplyTo(doc);
|
patchDoc.ApplyTo(doc);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Assert.Equal(null, doc.StringProperty);
|
Assert.Null(doc.StringProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -400,7 +400,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters
|
||||||
deserialized.ApplyTo(doc);
|
deserialized.ApplyTo(doc);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Assert.Equal(null, doc.StringProperty);
|
Assert.Null(doc.StringProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -720,8 +720,8 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters
|
||||||
var serialized = JsonConvert.SerializeObject(patchDoc);
|
var serialized = JsonConvert.SerializeObject(patchDoc);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Assert.Equal(false, serialized.Contains("operations"));
|
Assert.False(serialized.Contains("operations"));
|
||||||
Assert.Equal(false, serialized.Contains("Operations"));
|
Assert.False(serialized.Contains("Operations"));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -864,7 +864,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters
|
||||||
// Assert
|
// Assert
|
||||||
Assert.Equal(1, doc.SimpleDTO.DoubleValue);
|
Assert.Equal(1, doc.SimpleDTO.DoubleValue);
|
||||||
Assert.Equal(0, doc.SimpleDTO.IntegerValue);
|
Assert.Equal(0, doc.SimpleDTO.IntegerValue);
|
||||||
Assert.Equal(null, doc.SimpleDTO.IntegerList);
|
Assert.Null(doc.SimpleDTO.IntegerList);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -1460,7 +1460,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Assert.Equal("A", doc.AnotherStringProperty);
|
Assert.Equal("A", doc.AnotherStringProperty);
|
||||||
Assert.Equal(null, doc.StringProperty);
|
Assert.Null(doc.StringProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -1485,7 +1485,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Assert.Equal("A", doc.AnotherStringProperty);
|
Assert.Equal("A", doc.AnotherStringProperty);
|
||||||
Assert.Equal(null, doc.StringProperty);
|
Assert.Null(doc.StringProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
|
@ -2283,7 +2283,7 @@ namespace Microsoft.AspNetCore.JsonPatch.Adapters
|
||||||
deserialized.ApplyTo(doc);
|
deserialized.ApplyTo(doc);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Assert.Equal(null, doc.StringProperty);
|
Assert.Null(doc.StringProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
class ClassWithPrivateProperties
|
class ClassWithPrivateProperties
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue