mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-22 05:47:28 +02:00
Code updated to 3.0.238
This commit is contained in:
parent
3302d80678
commit
9c6a1fa92b
257 changed files with 7763 additions and 2861 deletions
|
@ -13,13 +13,13 @@ namespace TestTINKLib
|
|||
private class BikeInfoMutable : TINK.Model.Bike.BC.BikeInfoMutable
|
||||
{
|
||||
public BikeInfoMutable(
|
||||
int id,
|
||||
string id,
|
||||
bool isDemo = false,
|
||||
IEnumerable<string> group = null,
|
||||
WheelType? wheelType = null,
|
||||
TypeOfBike? typeOfBike = null,
|
||||
string description = null,
|
||||
int? currentStationId = null,
|
||||
string currentStationId = null,
|
||||
Uri operatorUri = null,
|
||||
TariffDescription tariffDescription = null,
|
||||
Func<DateTime> dateTimeProvider = null,
|
||||
|
@ -32,13 +32,13 @@ namespace TestTINKLib
|
|||
public void TestConstruct()
|
||||
{
|
||||
var l_oBike = new BikeInfoMutable(
|
||||
42,
|
||||
"42",
|
||||
false,
|
||||
new List<string> { "TINK" },
|
||||
WheelType.Two,
|
||||
TypeOfBike.Cargo);
|
||||
|
||||
Assert.AreEqual(42, l_oBike.Id);
|
||||
Assert.AreEqual("42", l_oBike.Id);
|
||||
Assert.IsFalse(l_oBike.IsDemo);
|
||||
Assert.AreEqual(WheelType.Two, l_oBike.WheelType);
|
||||
Assert.AreEqual(TypeOfBike.Cargo, l_oBike.TypeOfBike);
|
||||
|
@ -46,32 +46,32 @@ namespace TestTINKLib
|
|||
Assert.IsNull(l_oBike.CurrentStation);
|
||||
|
||||
l_oBike = new BikeInfoMutable(
|
||||
17,
|
||||
"17",
|
||||
true,
|
||||
new List<string> { "TINK" },
|
||||
WheelType.Mono,
|
||||
TypeOfBike.Allround,
|
||||
"Test description",
|
||||
1);
|
||||
"1");
|
||||
|
||||
Assert.AreEqual(17, l_oBike.Id);
|
||||
Assert.AreEqual("17", l_oBike.Id);
|
||||
Assert.IsTrue(l_oBike.IsDemo);
|
||||
Assert.AreEqual(WheelType.Mono, l_oBike.WheelType);
|
||||
Assert.AreEqual(TypeOfBike.Allround, l_oBike.TypeOfBike);
|
||||
Assert.AreEqual(InUseStateEnum.Disposable, l_oBike.State.Value);
|
||||
Assert.AreEqual(1, l_oBike.CurrentStation);
|
||||
Assert.AreEqual("1", l_oBike.CurrentStation);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestToString()
|
||||
{
|
||||
var l_oBike = new BikeInfoMutable(3, false, new List<string> { "TINK" }, WheelType.Two, TypeOfBike.Cargo, dateTimeProvider: () => new DateTime(1970, 1, 1));
|
||||
var l_oBike = new BikeInfoMutable("3", false, new List<string> { "TINK" }, WheelType.Two, TypeOfBike.Cargo, dateTimeProvider: () => new DateTime(1970, 1, 1));
|
||||
|
||||
Assert.AreEqual(
|
||||
"Id=3, wheel(s)=Two, type=Cargo, demo=False, state=Disposable, location=On the road.",
|
||||
l_oBike.ToString());
|
||||
|
||||
l_oBike = new BikeInfoMutable(3, true, new List<string> { "TINK" }, WheelType.Trike, TypeOfBike.Allround, "Test description", 5, dateTimeProvider: () => new DateTime(1970, 1, 1));
|
||||
l_oBike = new BikeInfoMutable("3", true, new List<string> { "TINK" }, WheelType.Trike, TypeOfBike.Allround, "Test description", "5", dateTimeProvider: () => new DateTime(1970, 1, 1));
|
||||
Assert.AreEqual(
|
||||
"Id=3, wheel(s)=Trike, type=Allround, demo=True, state=Disposable, location=Station 5.",
|
||||
l_oBike.ToString());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue