sharee.bike-App/TestShareeLib/Repository/Response/TestJsonConvert.cs

27 lines
791 B
C#
Raw Normal View History

2021-05-13 20:09:46 +02:00
using NUnit.Framework;
using TINK.Repository.Exception;
using TINK.Repository.Response;
namespace TestShareeLib.Model.Repository.Response
{
[TestFixture]
public class TestJsonConvert
{
[Test]
public void TestDeserializeObject()
{
Assert.That(
2021-06-26 20:57:55 +02:00
() => JsonConvertRethrow.DeserializeObject<TariffDescription>(
2021-05-13 20:09:46 +02:00
@"{
""eur_per_hour"" : ""10.00"",
""abo_eur_per_month"" : ""920.00"",
""free_hours"" : ""3.00"",
""number"" : ""5494"",
-- this is not JSON !
""name"" : ""Tester Basic""
}"),
Throws.InstanceOf<DeserializationException>());
}
}
}