2021-07-12 21:31:46 +02:00
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
using TINK.Model;
|
|
|
|
|
using TINK.Repository;
|
|
|
|
|
|
|
|
|
|
using static TINK.Repository.CopriCallsMemory;
|
|
|
|
|
|
|
|
|
|
namespace TestTINKLib.Fixtures.Connector
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
[TestFixture]
|
|
|
|
|
public class TestBikesAvailableResponse
|
|
|
|
|
{
|
|
|
|
|
[Test]
|
|
|
|
|
public void TestDeserialize_StateAvailable()
|
|
|
|
|
{
|
|
|
|
|
// Deserialize object and verify.
|
2022-04-25 22:15:15 +02:00
|
|
|
|
var l_oContainer = GetBikesAvailable(TinkApp.MerchantId, sampleSet: SampleSets.Set2, stageIndex: 1);
|
2021-07-12 21:31:46 +02:00
|
|
|
|
Assert.AreEqual(12, l_oContainer.bikes.Count);
|
|
|
|
|
|
|
|
|
|
// Check first entry.
|
|
|
|
|
Assert.AreEqual("Cargo Trike", l_oContainer.bikes["3399"].description);
|
|
|
|
|
Assert.AreEqual("26", l_oContainer.bikes["3399"].bike);
|
|
|
|
|
Assert.AreEqual("available", l_oContainer.bikes["3399"].state);
|
|
|
|
|
Assert.AreEqual("47.6586936667", l_oContainer.bikes["3399"].gps.latitude);
|
|
|
|
|
Assert.AreEqual("9.16863116667", l_oContainer.bikes["3399"].gps.longitude);
|
|
|
|
|
Assert.AreEqual("4", l_oContainer.bikes["3399"].station);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|