-Marked BSON classes as obsolete

This commit is contained in:
James Newton-King
2017-02-19 20:39:23 +13:00
parent 980cab1a22
commit 354249822a
20 changed files with 59 additions and 35 deletions
@@ -114,6 +114,7 @@ namespace Newtonsoft.Json.Tests.Converters
Assert.AreEqual(RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture, r.Regex.Options);
}
#pragma warning disable 618
[Test]
public void SerializeToBson()
{
@@ -132,19 +133,6 @@ namespace Newtonsoft.Json.Tests.Converters
Assert.AreEqual(expected, bson);
}
[Test]
public void DeserializeFromText()
{
string json = @"{
""Pattern"": ""abc"",
""Options"": 513
}";
Regex newRegex = JsonConvert.DeserializeObject<Regex>(json, new RegexConverter());
Assert.AreEqual("abc", newRegex.ToString());
Assert.AreEqual(RegexOptions.IgnoreCase | RegexOptions.CultureInvariant, newRegex.Options);
}
[Test]
public void DeserializeFromBson()
{
@@ -209,6 +197,20 @@ namespace Newtonsoft.Json.Tests.Converters
Assert.AreEqual("/", c.Regex.ToString());
Assert.AreEqual(RegexOptions.IgnoreCase | RegexOptions.Singleline | RegexOptions.Multiline | RegexOptions.ExplicitCapture, c.Regex.Options);
}
#pragma warning restore 618
[Test]
public void DeserializeFromText()
{
string json = @"{
""Pattern"": ""abc"",
""Options"": 513
}";
Regex newRegex = JsonConvert.DeserializeObject<Regex>(json, new RegexConverter());
Assert.AreEqual("abc", newRegex.ToString());
Assert.AreEqual(RegexOptions.IgnoreCase | RegexOptions.CultureInvariant, newRegex.Options);
}
[Test]
public void ConvertEmptyRegexJson()