Fix tests on environments with different line endings (#1831)
This commit is contained in:
@@ -462,7 +462,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
|
||||
string json = JsonConvert.SerializeObject(d, Formatting.Indented);
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""key"": [
|
||||
{
|
||||
""Text1"": ""value1""
|
||||
|
||||
@@ -441,7 +441,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
ContractResolver = new DictionaryKeyContractResolver()
|
||||
});
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""NAME"": ""James"",
|
||||
""AGE"": 1,
|
||||
""ROLENAMES"": {
|
||||
@@ -574,7 +574,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
ContractResolver = new IgnoredPropertiesContractResolver()
|
||||
});
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""Name"": ""Name!""
|
||||
}", json);
|
||||
|
||||
@@ -2907,7 +2907,7 @@ keyword such as type of business.""
|
||||
|
||||
string json = JsonConvert.SerializeObject(o, Formatting.Indented);
|
||||
|
||||
Assert.AreEqual(@"{
|
||||
StringAssert.AreEqual(@"{
|
||||
""IEnumerableProperty"": [
|
||||
4,
|
||||
5,
|
||||
|
||||
@@ -269,12 +269,12 @@ Newtonsoft.Json Error: 0 : Error!
|
||||
$('#element')
|
||||
]", json);
|
||||
|
||||
Assert.IsTrue(traceWriter.ToString().EndsWith(@"Verbose Serialized JSON:
|
||||
Assert.IsTrue(StringAssert.Normalize(traceWriter.ToString()).EndsWith(StringAssert.Normalize(@"Verbose Serialized JSON:
|
||||
[
|
||||
$('#element'),
|
||||
$('#element'),
|
||||
$('#element')
|
||||
]", StringComparison.Ordinal));
|
||||
]"), StringComparison.Ordinal));
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
Reference in New Issue
Block a user