mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-06 02:56:32 +01:00
58 lines
1.4 KiB
C#
58 lines
1.4 KiB
C#
|
using System;
|
||
|
using NUnit.Framework;
|
||
|
using TINK.Model.Bikes.BikeInfoNS.BluetoothLock;
|
||
|
using TINK.Model.Bikes.BikeInfoNS.DriveNS;
|
||
|
|
||
|
namespace TestShareeLib.Model.Bike.BluetoothLock
|
||
|
{
|
||
|
[TestFixture]
|
||
|
public class TestBikeInfoMutalbe
|
||
|
{
|
||
|
[Test]
|
||
|
public void TestCtor()
|
||
|
{
|
||
|
Assert.That(
|
||
|
new BikeInfoMutable(
|
||
|
new TINK.Model.Bikes.BikeInfoNS.BluetoothLock.BikeInfo(
|
||
|
new TINK.Model.Bikes.BikeInfoNS.BikeNS.Bike(
|
||
|
"MyBikeId",
|
||
|
TINK.Model.Bikes.BikeInfoNS.BikeNS.LockModel.ILockIt),
|
||
|
new Drive(),
|
||
|
TINK.Model.Bikes.BikeInfoNS.BC.DataSource.Copri,
|
||
|
42,
|
||
|
new Guid(),
|
||
|
"17"),
|
||
|
"My Station Name").StationName,
|
||
|
Is.EqualTo("My Station Name"));
|
||
|
}
|
||
|
|
||
|
[Test]
|
||
|
public void TestToString()
|
||
|
{
|
||
|
Assert.That(
|
||
|
new BikeInfoMutable(
|
||
|
new TINK.Model.Bikes.BikeInfoNS.BluetoothLock.BikeInfo(
|
||
|
new TINK.Model.Bikes.BikeInfoNS.BikeNS.Bike(
|
||
|
"MyBikeId",
|
||
|
TINK.Model.Bikes.BikeInfoNS.BikeNS.LockModel.ILockIt,
|
||
|
TINK.Model.Bikes.BikeInfoNS.BikeNS.WheelType.Trike,
|
||
|
TINK.Model.Bikes.BikeInfoNS.BikeNS.TypeOfBike.Cargo),
|
||
|
new Drive(),
|
||
|
TINK.Model.Bikes.BikeInfoNS.BC.DataSource.Copri,
|
||
|
42,
|
||
|
new Guid(),
|
||
|
"17"),
|
||
|
"My Station Name").ToString(),
|
||
|
Is.EqualTo("Id=MyBikeId;type=Cargo;state=Disposable"));
|
||
|
}
|
||
|
|
||
|
[Test]
|
||
|
public void TestCtorBikeNull()
|
||
|
{
|
||
|
Assert.That(
|
||
|
() => new BikeInfoMutable(null, "My Station Name"),
|
||
|
Throws.ArgumentNullException);
|
||
|
}
|
||
|
}
|
||
|
}
|