Version 3.0.366

This commit is contained in:
Anja 2023-06-06 12:00:24 +02:00
parent 0eb7362cb8
commit 24cdfbb0ca
84 changed files with 900 additions and 393 deletions

View file

@ -1,4 +1,4 @@
using System.Linq;
using System.Linq;
using NUnit.Framework;
using TINK.Repository.Response;
@ -129,7 +129,7 @@ namespace TestShareeLib.Repository.Response
}
/// <summary>
/// Verifies that unknown elemts in JSON to not lead to firing of exceptions.
/// Verifies that unknown elements in JSON to not lead to firing of exceptions.
/// </summary>
[Test]
public void TestDeserialize_NewElement()
@ -186,7 +186,47 @@ namespace TestShareeLib.Repository.Response
Assert.That(
tariffDescription.tarif_elements.Count,
Is.EqualTo(2),
"Dupliate elements are supposed to be ignored.");
"Duplicate elements are supposed to be ignored.");
}
public static string RENTALDESCRIPTIONRESPONSE_A_V4_1_23_03 = @"{
""tarif_elements"": {
""1"": [
""Mietgebühr"",
""1,50 / 30 Min ""
],
""4"": [
""Max. Gebühr"",
""25,00 / Tag""
],
""6"": [
""Gratis Mietzeit"",
""30 Min / Tag""
]
},
""reserve_timerange"": ""30"",
""id"": ""100"",
""name"": ""Basis"",
""rental_info"": {
""1"": [
""Tracking"",
""Ich stimme der Speicherung (Tracking) meiner Fahrstrecke zwecks wissenschaftlicher Auswertung und Berechnung der CO2-Einsparung zu!""
],
""2"": [
""AAFahrten"",
""Dieses E-Lastenrad darf nur an der Station zurück gegeben werden an der es ausgeliehen wurde!""
]
}
}";
[Test]
public void TestReserveTimeRange()
{
var response = JsonConvertRethrow.DeserializeObject<RentalDescription>(RENTALDESCRIPTIONRESPONSE_A_V4_1_23_03);
Assert.That(
response.reserve_timerange,
Is.EqualTo("30"));
}
}
}

View file

@ -1,4 +1,4 @@
using NUnit.Framework;
using NUnit.Framework;
using TINK.Repository.Response;
namespace TestShareeLib.Repository.Response
@ -73,7 +73,7 @@ namespace TestShareeLib.Repository.Response
}
/// <summary>
/// Verifies that unknown elemts in JSON to not lead to firing of exceptions.
/// Verifies that unknown elements in JSON to not lead to firing of exceptions.
/// </summary>
[Test]
public void TestDeserialize_NewElement()