mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-19 03:27:29 +02:00
Version 3.0.338
This commit is contained in:
parent
573fe77e12
commit
0468955d49
751 changed files with 62747 additions and 60672 deletions
|
@ -4,26 +4,26 @@ using TINK.Model.Station;
|
|||
|
||||
namespace TestTINKLib.Fixtures.ObjectTests.Station
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestNullStation
|
||||
{
|
||||
[Test]
|
||||
public void TestConstruct()
|
||||
{
|
||||
var nullStation = new NullStation();
|
||||
[TestFixture]
|
||||
public class TestNullStation
|
||||
{
|
||||
[Test]
|
||||
public void TestConstruct()
|
||||
{
|
||||
var nullStation = new NullStation();
|
||||
|
||||
// Was -1 before swiching type of id from int to string when switching from COPRI version v4.0 to v4.1
|
||||
Assert.That(
|
||||
nullStation.Id,
|
||||
Is.Null);
|
||||
// Was -1 before swiching type of id from int to string when switching from COPRI version v4.0 to v4.1
|
||||
Assert.That(
|
||||
nullStation.Id,
|
||||
Is.Null);
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,43 +7,43 @@ using TINK.Model;
|
|||
namespace TestTINKLib.Fixtures.Station
|
||||
{
|
||||
|
||||
[TestFixture]
|
||||
public class TestStation
|
||||
{
|
||||
[Test]
|
||||
public void TestConstruct()
|
||||
{
|
||||
var l_oStation = new TINK.Model.Station.Station("7", new HashSet<string>(new List<string> { "TINK" }).ToList(), PositionFactory.Create(1, 2), "Hallo");
|
||||
Assert.AreEqual("7", l_oStation.Id);
|
||||
Assert.AreEqual("TINK", string.Join(",", l_oStation.Group));
|
||||
Assert.AreEqual(1, l_oStation.Position.Latitude);
|
||||
Assert.AreEqual(2, l_oStation.Position.Longitude);
|
||||
Assert.AreEqual("Hallo", l_oStation.StationName);
|
||||
}
|
||||
[TestFixture]
|
||||
public class TestStation
|
||||
{
|
||||
[Test]
|
||||
public void TestConstruct()
|
||||
{
|
||||
var l_oStation = new TINK.Model.Station.Station("7", new HashSet<string>(new List<string> { "TINK" }).ToList(), PositionFactory.Create(1, 2), "Hallo");
|
||||
Assert.AreEqual("7", l_oStation.Id);
|
||||
Assert.AreEqual("TINK", string.Join(",", l_oStation.Group));
|
||||
Assert.AreEqual(1, l_oStation.Position.Latitude);
|
||||
Assert.AreEqual(2, l_oStation.Position.Longitude);
|
||||
Assert.AreEqual("Hallo", l_oStation.StationName);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestConstruct_InvalidStationName()
|
||||
{
|
||||
var l_oStation = new TINK.Model.Station.Station("7", new HashSet<string>(new List<string> { "TINK" }).ToList(), PositionFactory.Create(1, 2), null);
|
||||
Assert.AreEqual("7", l_oStation.Id);
|
||||
Assert.AreEqual("TINK", string.Join(",", l_oStation.Group));
|
||||
Assert.AreEqual(1, l_oStation.Position.Latitude);
|
||||
Assert.AreEqual(2, l_oStation.Position.Longitude);
|
||||
Assert.AreEqual("", l_oStation.StationName);
|
||||
}
|
||||
[Test]
|
||||
public void TestConstruct_InvalidStationName()
|
||||
{
|
||||
var l_oStation = new TINK.Model.Station.Station("7", new HashSet<string>(new List<string> { "TINK" }).ToList(), PositionFactory.Create(1, 2), null);
|
||||
Assert.AreEqual("7", l_oStation.Id);
|
||||
Assert.AreEqual("TINK", string.Join(",", l_oStation.Group));
|
||||
Assert.AreEqual(1, l_oStation.Position.Latitude);
|
||||
Assert.AreEqual(2, l_oStation.Position.Longitude);
|
||||
Assert.AreEqual("", l_oStation.StationName);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestConstruct_InvalidStationGroup()
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => new TINK.Model.Station.Station("7", null, PositionFactory.Create(1, 2), "Hallo"));
|
||||
}
|
||||
[Test]
|
||||
public void TestConstruct_InvalidStationGroup()
|
||||
{
|
||||
Assert.Throws<ArgumentException>(() => new TINK.Model.Station.Station("7", null, PositionFactory.Create(1, 2), "Hallo"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestConstruct_NoOperator()
|
||||
{
|
||||
Assert.That(
|
||||
new TINK.Model.Station.Station("7", new List<string>(), PositionFactory.Create(1, 2), "Hallo").OperatorData,
|
||||
Is.Not.Null);
|
||||
}
|
||||
}
|
||||
[Test]
|
||||
public void TestConstruct_NoOperator()
|
||||
{
|
||||
Assert.That(
|
||||
new TINK.Model.Station.Station("7", new List<string>(), PositionFactory.Create(1, 2), "Hallo").OperatorData,
|
||||
Is.Not.Null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue