2013-05-13 04:52:55 +02:00
|
|
|
using NUnit.Framework;
|
2013-05-12 17:18:17 +02:00
|
|
|
using NzbDrone.Common.Serializer;
|
2013-04-17 02:24:49 +02:00
|
|
|
using NzbDrone.Test.Common;
|
2013-04-17 01:21:03 +02:00
|
|
|
|
2013-05-13 04:52:55 +02:00
|
|
|
namespace NzbDrone.Libraries.Test.JsonTests
|
2013-04-17 01:21:03 +02:00
|
|
|
{
|
|
|
|
[TestFixture]
|
2013-05-13 04:52:55 +02:00
|
|
|
public class JsonFixture : TestBase
|
2013-04-17 01:21:03 +02: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-05-13 04:52:55 +02:00
|
|
|
var json = Json.Serialize(quality);
|
2013-04-17 01:21:03 +02:00
|
|
|
|
2013-05-13 04:52:55 +02:00
|
|
|
Json.Deserialize<TypeWithNumbers>(json);
|
2013-04-17 01:21:03 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|