sharee.bike-App/LockIt.BusinessLogic.Tests/Services/BluetoothLock/Exception/TestCouldntCloseInconsistentStateExecption.cs
2024-04-09 12:53:23 +02:00

29 lines
726 B
C#

using NUnit.Framework;
using ShareeBike.Model.Bikes.BikeInfoNS.BluetoothLock;
namespace ShareeBike.Services.BluetoothLock.Exception
{
[TestFixture]
public class TestCouldntCloseInconsistentStateExecption
{
[Test]
public void TestCtor_Unknown()
{
var ex = new CouldntCloseInconsistentStateExecption(LockingState.UnknownFromHardwareError);
Assert.That(
ex.Message,
Is.EqualTo("Lock reports unknown bold position. Lock could be closed or open. Please try again or contact customer support."));
}
[Test]
public void TestCtor_Open()
{
var ex = new CouldntCloseInconsistentStateExecption(LockingState.Open);
Assert.That(
ex.Message,
Does.Contain("locking state \"Open\""));
}
}
}