sharee.bike-App/TestShareeLib/Model/Station/TestNullStation.cs

30 lines
729 B
C#
Raw Normal View History

2023-04-19 12:14:14 +02:00
using System.Linq;
2022-08-30 15:42:25 +02:00
using NUnit.Framework;
2023-04-19 12:14:14 +02:00
using TINK.Model.Stations;
2021-07-12 21:31:46 +02:00
namespace TestTINKLib.Fixtures.ObjectTests.Station
{
2022-09-06 16:08:19 +02:00
[TestFixture]
public class TestNullStation
{
[Test]
public void TestConstruct()
{
2023-04-19 12:14:14 +02:00
var nullStation = new TINK.Model.Stations.StationNS.NullStation();
2021-07-12 21:31:46 +02:00
2023-04-19 12:14:14 +02:00
// Was -1 before switching type of id from int to string when switching from COPRI version v4.0 to v4.1
2022-09-06 16:08:19 +02:00
Assert.That(
nullStation.Id,
Is.Null);
2021-07-12 21:31:46 +02:00
2022-09-06 16:08:19 +02:00
Assert.AreEqual(0, nullStation.Group.ToList().Count);
Assert.AreEqual(string.Empty, nullStation.StationName);
Assert.IsNaN(nullStation.Position.Latitude);
Assert.IsNaN(nullStation.Position.Longitude);
Assert.That(
nullStation.OperatorData,
Is.Not.Null);
}
}
2021-07-12 21:31:46 +02:00
}