2021-05-13 17:07:16 +02:00
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
using TINK.Model.Bike.BluetoothLock;
|
|
|
|
|
|
|
|
|
|
namespace TINK.Services.BluetoothLock.Exception
|
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
|
|
|
|
public class TestCouldntOpenInconsistentStateExecption
|
|
|
|
|
{
|
|
|
|
|
[Test]
|
|
|
|
|
public void TestCtor_Unknown()
|
|
|
|
|
{
|
|
|
|
|
var ex = new CouldntOpenInconsistentStateExecption(LockingState.Unknown);
|
|
|
|
|
|
|
|
|
|
Assert.That(
|
|
|
|
|
ex.Message,
|
2021-06-26 20:57:55 +02:00
|
|
|
|
Is.EqualTo("Unexpected locking state \"Unknown\" detected after sending open command."));
|
2021-05-13 17:07:16 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void TestCtor_Open()
|
|
|
|
|
{
|
|
|
|
|
var ex = new CouldntOpenInconsistentStateExecption(LockingState.Closed);
|
|
|
|
|
|
|
|
|
|
Assert.That(
|
|
|
|
|
ex.Message,
|
|
|
|
|
Does.Contain("locking state \"Closed\""));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|