mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-22 04:46:30 +02:00
Legacy testing lib added..
This commit is contained in:
parent
0167fc321f
commit
47ed05837e
118 changed files with 17505 additions and 0 deletions
42
TestTINKLib/Fixtures/ObjectTests/Station/TestStation.cs
Normal file
42
TestTINKLib/Fixtures/ObjectTests/Station/TestStation.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using TINK.Model.Station;
|
||||
|
||||
|
||||
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(), new Position(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(), new Position(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, new Position(1, 2), "Hallo"));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue