mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
added an abstraction layer for json serializer, should work in mono.
This commit is contained in:
parent
213c842050
commit
65ae894410
14 changed files with 94 additions and 98 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue