-Tests
This commit is contained in:
@@ -123,7 +123,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
TypeNameAssemblyFormat = FormatterAssemblyStyle.Full
|
||||
});
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""$type"": ""System.Dynamic.ExpandoObject, System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"",
|
||||
""Text"": ""Text!"",
|
||||
""Integer"": 2147483647,
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
|
||||
string json = JsonConvert.SerializeObject(e, Formatting.Indented);
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""extensionData1"": [
|
||||
1,
|
||||
2,
|
||||
|
||||
@@ -2227,7 +2227,7 @@ keyword such as type of business.""
|
||||
|
||||
string json = JsonConvert.SerializeObject(c, Formatting.Indented);
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""DefaultConverter"": ""1970-01-01T00:00:00Z"",
|
||||
""MemberConverter"": ""1970-01-01T00:00:00Z""
|
||||
}", json);
|
||||
@@ -5684,7 +5684,7 @@ Path '', line 1, position 1.");
|
||||
// ""nonVirtualMember"": ""NonVirtualMember!""
|
||||
//}", result);
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""virtualMember"": ""VirtualMember!"",
|
||||
""nonVirtualMember"": ""NonVirtualMember!""
|
||||
}", result);
|
||||
@@ -6896,7 +6896,7 @@ Path '', line 1, position 1.");
|
||||
JValue v = (JValue)a[0];
|
||||
|
||||
Assert.AreEqual(typeof(string), v.Value.GetType());
|
||||
Assert.AreEqual(@"[
|
||||
StringAssert.AreEqual(@"[
|
||||
""2000-01-02T03:04:05+06:00""
|
||||
]", a.ToString());
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
};
|
||||
string serializedString = JsonConvert.SerializeObject(inputContext, jsonSerializerSettings);
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""$type"": ""System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.Guid, mscorlib]], mscorlib"",
|
||||
""k1"": ""5dd2dba0-20c0-49f8-a054-1fa3b0a8d774""
|
||||
}", serializedString);
|
||||
@@ -259,7 +259,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
|
||||
string json = JsonConvert.SerializeObject(child, Formatting.Indented);
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""_id"": 2,
|
||||
""Name"": ""Isabell"",
|
||||
""Father"": {
|
||||
|
||||
@@ -226,7 +226,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
Assert.AreEqual(null, obj.Member5);
|
||||
|
||||
string json = JsonConvert.SerializeObject(obj, Formatting.Indented);
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""Member1"": 11,
|
||||
""Member2"": ""This value went into the data file during serialization."",
|
||||
""Member4"": null
|
||||
|
||||
@@ -188,7 +188,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
// }
|
||||
// ]
|
||||
|
||||
Assert.AreEqual(@"[
|
||||
StringAssert.AreEqual(@"[
|
||||
{
|
||||
""Name"": ""Joe Employee"",
|
||||
""Manager"": {
|
||||
@@ -331,7 +331,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
// }
|
||||
//]
|
||||
|
||||
Assert.AreEqual(@"[
|
||||
StringAssert.AreEqual(@"[
|
||||
{
|
||||
""Name"": ""Joe Family Details"",
|
||||
""NumberOfChildren"": 4
|
||||
|
||||
@@ -1660,7 +1660,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
};
|
||||
string serializedString = JsonConvert.SerializeObject(inputContext, jsonSerializerSettings);
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""$type"": ""System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.Guid, mscorlib]], mscorlib"",
|
||||
""k1"": ""a6e986df-fc2c-4906-a1ef-9492388f7833""
|
||||
}", serializedString);
|
||||
|
||||
Reference in New Issue
Block a user