sharee.bike-App/TestShareeLib/Repository/Exception/TestNoGPSDataException.cs

32 lines
766 B
C#
Raw Normal View History

2021-07-12 21:31:46 +02:00
using NUnit.Framework;
using TINK.Repository.Exception;
namespace TestTINKLib.Fixtures.ObjectTests.Repository.Exception
{
2022-09-06 16:08:19 +02:00
[TestFixture]
public class TestNoGPSDataException
{
[Test]
public void TestIsNotAtStation()
{
const string responseText = "Failure 2245: No GPS data, state change forbidden.";
2021-07-12 21:31:46 +02:00
2022-09-06 16:08:19 +02:00
NoGPSDataException exception = null;
2021-07-12 21:31:46 +02:00
2022-09-06 16:08:19 +02:00
Assert.That(() => NoGPSDataException.IsNoGPSData(responseText, out exception),
Is.EqualTo(true));
}
2021-07-12 21:31:46 +02:00
2022-09-06 16:08:19 +02:00
[Test]
public void TestIsNotAtStation_InvalidNr()
{
const string responseText = "Failure 2248: No GPS data, state change forbidden.";
2021-07-12 21:31:46 +02:00
2022-09-06 16:08:19 +02:00
NoGPSDataException exception = null;
2021-07-12 21:31:46 +02:00
2022-09-06 16:08:19 +02:00
Assert.That(() => NoGPSDataException.IsNoGPSData(responseText, out exception),
Is.EqualTo(false));
}
}
2021-07-12 21:31:46 +02:00
}