sharee.bike-App/TestShareeLib/Repository/Response/TestJsonConvert.cs
Anja Müller-Meißner 0468955d49 Version 3.0.338
2022-09-08 09:55:14 +02:00

26 lines
707 B
C#

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(
() => JsonConvertRethrow.DeserializeObject<TariffDescription>(
@"{
""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>());
}
}
}