mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-16 23:26:26 +01:00
58 lines
1.4 KiB
C#
58 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using NUnit.Framework;
|
|
using TINK.Model.Bikes.BikeInfoNS;
|
|
using TINK.Model.Bikes.BikeInfoNS.BC;
|
|
using TINK.Model.Bikes.BikeInfoNS.BikeNS;
|
|
using TINK.Model.Bikes.BikeInfoNS.DriveNS;
|
|
using TINK.Model.State;
|
|
|
|
namespace TestTINKLib.Fixtures.ObjectTests.Bike.BC
|
|
{
|
|
[TestFixture]
|
|
public class TestBikeInfo
|
|
{
|
|
/// <summary>
|
|
/// Dummy subclass to provide assess to protected member for testing.
|
|
/// </summary>
|
|
private class TestBikeInfoSubClass : BikeInfo
|
|
{
|
|
public TestBikeInfoSubClass(
|
|
IStateInfo stateInfo,
|
|
TINK.Model.Bikes.BikeInfoNS.BikeNS.Bike bike,
|
|
DriveMutable drive,
|
|
bool? isDemo = DEFAULTVALUEISDEMO,
|
|
IEnumerable<string> group = null,
|
|
string stationId = null,
|
|
Uri operatorUri = null,
|
|
RentalDescription tariffDescription = null) : base(
|
|
stateInfo,
|
|
bike,
|
|
drive,
|
|
DataSource.Copri,
|
|
isDemo,
|
|
group,
|
|
stationId,
|
|
operatorUri,
|
|
tariffDescription)
|
|
{
|
|
}
|
|
}
|
|
|
|
[Test]
|
|
public void TestCtorBikeNull()
|
|
{
|
|
Assert.That(
|
|
() => new TestBikeInfoSubClass(new StateInfo(), null, new DriveMutable()),
|
|
Throws.ArgumentNullException);
|
|
}
|
|
|
|
[Test]
|
|
public void TestCtorDriveNull()
|
|
{
|
|
Assert.That(
|
|
() => new TestBikeInfoSubClass(new StateInfo(), new TINK.Model.Bikes.BikeInfoNS.BikeNS.Bike(string.Empty, LockModel.ILockIt), null),
|
|
Throws.ArgumentNullException);
|
|
}
|
|
}
|
|
}
|