2023-01-18 14:22:51 +01:00
|
|
|
using NUnit.Framework;
|
2022-08-30 15:42:25 +02:00
|
|
|
using TINK.Model.Bikes.BikeInfoNS.BC;
|
|
|
|
using TINK.Model.Bikes.BikeInfoNS.DriveNS;
|
|
|
|
|
|
|
|
namespace TestShareeLib.Model.Bike.CopriLock
|
|
|
|
{
|
2022-09-06 16:08:19 +02:00
|
|
|
[TestFixture]
|
|
|
|
public class TestBikeInfoMutable
|
|
|
|
{
|
|
|
|
[Test]
|
|
|
|
public void TestCtorBikeInfoNull()
|
|
|
|
{
|
|
|
|
Assert.That(
|
|
|
|
() => new BikeInfoMutable(null, "Station 32"),
|
|
|
|
Throws.ArgumentNullException);
|
|
|
|
}
|
2022-08-30 15:42:25 +02:00
|
|
|
|
2022-09-06 16:08:19 +02:00
|
|
|
[Test]
|
|
|
|
public void TestCtorBikeInfo()
|
|
|
|
{
|
|
|
|
var bike = new TINK.Model.Bikes.BikeInfoNS.BikeNS.Bike(
|
|
|
|
"MyId",
|
|
|
|
TINK.Model.Bikes.BikeInfoNS.BikeNS.LockModel.Sigo);
|
2022-08-30 15:42:25 +02:00
|
|
|
|
2022-09-06 16:08:19 +02:00
|
|
|
var bikeInfo = new TINK.Model.Bikes.BikeInfoNS.CopriLock.BikeInfo(
|
|
|
|
bike,
|
|
|
|
new Drive(new TINK.Model.Bikes.BikeInfoNS.DriveNS.EngineNS.Engine("BackendLock")),
|
2023-01-18 14:22:51 +01:00
|
|
|
DataSource.Copri,
|
2022-09-06 16:08:19 +02:00
|
|
|
"StationId",
|
|
|
|
new TINK.Model.Bikes.BikeInfoNS.CopriLock.LockInfo());
|
2022-08-30 15:42:25 +02:00
|
|
|
|
2022-09-06 16:08:19 +02:00
|
|
|
Assert.That(
|
|
|
|
new BikeInfoMutable(bikeInfo, "Station 32").Drive.Type,
|
|
|
|
Is.EqualTo(DriveType.Pedelec));
|
|
|
|
}
|
|
|
|
}
|
2022-08-30 15:42:25 +02:00
|
|
|
}
|