-Fixed test
This commit is contained in:
@@ -27,6 +27,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
#if NET20
|
||||
using Newtonsoft.Json.Serialization;
|
||||
#else
|
||||
@@ -172,6 +173,22 @@ namespace Newtonsoft.Json.Tests
|
||||
}
|
||||
}
|
||||
|
||||
public static class StringAssert
|
||||
{
|
||||
private readonly static Regex Regex = new Regex(@"\r\n|\n\r|\n|\r", RegexOptions.CultureInvariant | RegexOptions.Compiled);
|
||||
|
||||
public static void AreEqual(string expected, string actual)
|
||||
{
|
||||
if (expected != null)
|
||||
expected = Regex.Replace(expected, "\r\n");
|
||||
|
||||
if (actual != null)
|
||||
actual = Regex.Replace(actual, "\r\n");
|
||||
|
||||
Assert.AreEqual(expected, actual);
|
||||
}
|
||||
}
|
||||
|
||||
public static class ExceptionAssert
|
||||
{
|
||||
public static void Throws<TException>(string message, Action action)
|
||||
|
||||
Reference in New Issue
Block a user