sharee.bike-App/TestLockItShared/Services/BluetoothLock/Exception/TestCouldntOpenInconsistentStateExecption.cs

30 lines
841 B
C#
Raw Normal View History

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
{
[TestFixture]
public class TestCouldntOpenInconsistentStateExecption
{
[Test]
public void TestCtor_Unknown()
{
2022-04-10 17:38:34 +02:00
var ex = new CouldntOpenInconsistentStateExecption(LockingState.UnknownFromHardwareError);
2021-05-13 17:07:16 +02:00
Assert.That(
ex.Message,
2022-04-10 17:38:34 +02:00
Is.EqualTo("Unexpected locking state \"UnknownFromHardwareError\" 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\""));
}
}
}