sharee.bike-App/TestShareeLib/Repository/Request/TestRequestBuilderHelper.cs
2022-12-27 21:08:09 +01:00

36 lines
744 B
C#

using System;
using NUnit.Framework;
using TINK.Model.Connector;
using TINK.Repository.Request;
namespace TestShareeLib.Repository.Request
{
[TestFixture]
public class TestRequestBuilderHelper
{
[Test]
public void TestGetLockStateNull()
=> Assert.That(
RequestBuilderHelper.GetLockState(null),
Is.Null);
[Test]
public void TestGetLockState([Values] LockingAction action)
{
switch (action)
{
case LockingAction.Open:
case LockingAction.Close:
break;
default:
throw new ArgumentException("Tests need possibly exended.");
}
Assert.That(
RequestBuilderHelper.GetLockState(action),
Is.EqualTo(action == LockingAction.Open ? lock_state.unlocking : lock_state.locking));
}
}
}