mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-23 22:25:09 -04:00
added an abstraction layer for json serializer, should work in mono.
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
using NUnit.Framework;
|
||||
using Newtonsoft.Json;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Test.Common;
|
||||
|
||||
namespace NzbDrone.Libraries.Test.Json
|
||||
{
|
||||
[TestFixture]
|
||||
public class JsonFixture
|
||||
public class JsonFixture : TestBase<JsonSerializer>
|
||||
{
|
||||
public class TypeWithNumbers
|
||||
{
|
||||
@@ -16,9 +17,9 @@ namespace NzbDrone.Libraries.Test.Json
|
||||
{
|
||||
var quality = new TypeWithNumbers { Id = 12 };
|
||||
|
||||
var json = JsonConvert.SerializeObject(quality);
|
||||
var json = Subject.Serialize(quality);
|
||||
|
||||
JsonConvert.DeserializeObject(json);
|
||||
Subject.Deserialize<TypeWithNumbers>(json);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user