2013-04-17 02:21:03 +03:00
|
|
|
using NUnit.Framework;
|
2013-04-17 03:24:49 +03:00
|
|
|
using NzbDrone.Common;
|
|
|
|
using NzbDrone.Test.Common;
|
2013-04-17 02:21:03 +03:00
|
|
|
|
|
|
|
namespace NzbDrone.Libraries.Test.Json
|
|
|
|
{
|
|
|
|
[TestFixture]
|
2013-04-17 03:24:49 +03:00
|
|
|
public class JsonFixture : TestBase<JsonSerializer>
|
2013-04-17 02:21:03 +03:00
|
|
|
{
|
|
|
|
public class TypeWithNumbers
|
|
|
|
{
|
|
|
|
public int Id { get; set; }
|
|
|
|
}
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void should_be_able_to_deserialize_numbers()
|
|
|
|
{
|
|
|
|
var quality = new TypeWithNumbers { Id = 12 };
|
|
|
|
|
2013-04-17 03:24:49 +03:00
|
|
|
var json = Subject.Serialize(quality);
|
2013-04-17 02:21:03 +03:00
|
|
|
|
2013-04-17 03:24:49 +03:00
|
|
|
Subject.Deserialize<TypeWithNumbers>(json);
|
2013-04-17 02:21:03 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|