mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-15 22:56:37 +01:00
26 lines
791 B
C#
26 lines
791 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>());
|
|
}
|
|
}
|
|
}
|