2021-07-12 21:31:46 +02:00
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
using TINK.Model;
|
|
|
|
|
|
|
|
|
|
using static TINK.Repository.CopriCallsMemory;
|
|
|
|
|
|
|
|
|
|
namespace TestTINKLib.Fixtures.Connector
|
|
|
|
|
{
|
2022-08-30 15:42:25 +02:00
|
|
|
|
|
2022-09-06 16:08:19 +02:00
|
|
|
|
[TestFixture]
|
|
|
|
|
public class TestStationsAllResponse
|
|
|
|
|
{
|
|
|
|
|
[Test]
|
|
|
|
|
public void TestDeserialize()
|
|
|
|
|
{
|
|
|
|
|
// Deserialize object and verify.
|
|
|
|
|
var l_oContainer = GetStationsAll(TinkApp.MerchantId, p_eSampleSet: SampleSets.Set2, p_lStageIndex: 1);
|
|
|
|
|
Assert.AreEqual(9, l_oContainer.stations.Count);
|
2021-07-12 21:31:46 +02:00
|
|
|
|
|
2022-09-06 16:08:19 +02:00
|
|
|
|
// Check first entry (type TINK).
|
|
|
|
|
Assert.AreEqual("4", l_oContainer.stations["5786"].station);
|
|
|
|
|
Assert.AreEqual("TINK", string.Join(",", l_oContainer.stations["5786"].station_group));
|
|
|
|
|
Assert.IsNull(l_oContainer.stations["5786"].description);
|
|
|
|
|
Assert.AreEqual("47.6586936667", l_oContainer.stations["5786"].gps.latitude);
|
|
|
|
|
Assert.AreEqual("9.16863116667", l_oContainer.stations["5786"].gps.longitude);
|
2021-07-12 21:31:46 +02:00
|
|
|
|
|
2022-09-06 16:08:19 +02:00
|
|
|
|
// Check Konrad entry.
|
|
|
|
|
Assert.AreEqual("14", l_oContainer.stations["14"].station);
|
|
|
|
|
Assert.AreEqual("Konrad", string.Join(",", l_oContainer.stations["14"].station_group));
|
|
|
|
|
Assert.AreEqual(string.Empty, l_oContainer.stations["14"].description);
|
|
|
|
|
Assert.AreEqual("47.66698054007847", l_oContainer.stations["14"].gps.latitude);
|
|
|
|
|
Assert.AreEqual("9.169303178787231", l_oContainer.stations["14"].gps.longitude);
|
2021-07-12 21:31:46 +02:00
|
|
|
|
|
2022-09-06 16:08:19 +02:00
|
|
|
|
// Check TINK/ Konrad entry.
|
|
|
|
|
Assert.AreEqual("31", l_oContainer.stations["31"].station);
|
|
|
|
|
Assert.AreEqual("TINK,Konrad", string.Join(",", l_oContainer.stations["31"].station_group));
|
|
|
|
|
Assert.AreEqual("Südstadt Station", l_oContainer.stations["31"].description);
|
|
|
|
|
Assert.AreEqual("47.69489", l_oContainer.stations["31"].gps.latitude);
|
|
|
|
|
Assert.AreEqual("9.19", l_oContainer.stations["31"].gps.longitude);
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-07-12 21:31:46 +02:00
|
|
|
|
}
|