mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-10-01 02:56:28 +02:00
37 lines
744 B
C#
37 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));
|
||
|
}
|
||
|
}
|
||
|
}
|