Update Newtonsoft.Json project to use nullable reference types (#1950)
This commit is contained in:
@@ -160,6 +160,14 @@ namespace Newtonsoft.Json.Tests.Converters
|
||||
Assert.AreEqual("<Time>0001-01-01T00:00:00</Time>", xmlNode.OuterXml);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void XmlNode_Null()
|
||||
{
|
||||
string json = JsonConvert.SerializeXmlNode(null);
|
||||
|
||||
Assert.AreEqual("null", json);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void XmlNode_Roundtrip_PropertyNameWithColon()
|
||||
{
|
||||
@@ -305,6 +313,14 @@ namespace Newtonsoft.Json.Tests.Converters
|
||||
}
|
||||
|
||||
#if !NET20
|
||||
[Test]
|
||||
public void XNode_Null()
|
||||
{
|
||||
string json = JsonConvert.SerializeXNode(null);
|
||||
|
||||
Assert.AreEqual("null", json);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void XNode_UnescapeTextContent()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user