2021-05-13 17:07:16 +02:00
|
|
|
|
using NUnit.Framework;
|
2022-08-30 15:42:25 +02:00
|
|
|
|
using TINK.Model.Bikes.BikeInfoNS.BluetoothLock;
|
2021-05-13 17:07:16 +02:00
|
|
|
|
|
|
|
|
|
namespace TINK.Services.BluetoothLock.Exception
|
|
|
|
|
{
|
2022-09-06 16:08:19 +02:00
|
|
|
|
[TestFixture]
|
|
|
|
|
public class TestCouldntCloseInconsistentStateExecption
|
|
|
|
|
{
|
|
|
|
|
[Test]
|
|
|
|
|
public void TestCtor_Unknown()
|
|
|
|
|
{
|
|
|
|
|
var ex = new CouldntCloseInconsistentStateExecption(LockingState.UnknownFromHardwareError);
|
2021-05-13 17:07:16 +02:00
|
|
|
|
|
2022-09-06 16:08:19 +02:00
|
|
|
|
Assert.That(
|
|
|
|
|
ex.Message,
|
|
|
|
|
Is.EqualTo("Lock reports unknown bold position."));
|
|
|
|
|
}
|
2021-05-13 17:07:16 +02:00
|
|
|
|
|
2022-09-06 16:08:19 +02:00
|
|
|
|
[Test]
|
|
|
|
|
public void TestCtor_Open()
|
|
|
|
|
{
|
|
|
|
|
var ex = new CouldntCloseInconsistentStateExecption(LockingState.Open);
|
2021-05-13 17:07:16 +02:00
|
|
|
|
|
2022-09-06 16:08:19 +02:00
|
|
|
|
Assert.That(
|
|
|
|
|
ex.Message,
|
|
|
|
|
Does.Contain("locking state \"Open\""));
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-05-13 17:07:16 +02:00
|
|
|
|
}
|