Version 3.0.339

This commit is contained in:
Anja 2022-09-16 11:19:46 +02:00
parent 0468955d49
commit 52c9f6f1d9
43 changed files with 993 additions and 614 deletions

View file

@ -1,39 +0,0 @@
using NUnit.Framework;
using TINK.Repository.Exception;
namespace TestTINKLib.Fixtures.ObjectTests.Repository.Exception
{
[TestFixture]
public class TestBookingDeclinedException
{
[Test]
public void TestIsBookingDeclined()
{
const string responseText = "OK: BOOKING_REQUEST declined. Max count of 8 occupied bikes has been reached";
BookingDeclinedException exception = null;
Assert.That(() => BookingDeclinedException.IsBookingDeclined(responseText, out exception),
Is.EqualTo(true));
Assert.That(() => exception.MaxBikesCount,
Is.EqualTo(8));
}
[Test]
public void TestIsBookingDeclined_InvalidNumber()
{
const string responseText = "OK: BOOKING_REQUEST declined. Max count of 8 occupied bikes has been reached";
BookingDeclinedException exception = null;
Assert.That(() => BookingDeclinedException.IsBookingDeclined(responseText, out exception),
Is.EqualTo(true));
Assert.That(() => exception.MaxBikesCount,
Is.EqualTo(8));
}
}
}

View file

@ -1,31 +0,0 @@
using NUnit.Framework;
using TINK.Repository.Exception;
namespace TestTINKLib.Fixtures.ObjectTests.Repository.Exception
{
[TestFixture]
public class TestNoGPSDataException
{
[Test]
public void TestIsNotAtStation()
{
const string responseText = "Failure 2245: No GPS data, state change forbidden.";
NoGPSDataException exception = null;
Assert.That(() => NoGPSDataException.IsNoGPSData(responseText, out exception),
Is.EqualTo(true));
}
[Test]
public void TestIsNotAtStation_InvalidNr()
{
const string responseText = "Failure 2248: No GPS data, state change forbidden.";
NoGPSDataException exception = null;
Assert.That(() => NoGPSDataException.IsNoGPSData(responseText, out exception),
Is.EqualTo(false));
}
}
}

View file

@ -1,37 +0,0 @@
using NUnit.Framework;
using TINK.Repository.Exception;
namespace TestTINKLib.Fixtures.ObjectTests.Repository.Exception
{
[TestFixture]
public class TestNotAtStationException
{
[Test]
public void TestIsNotAtStation()
{
const string responseText = "Failure 2178: bike 1545 out of GEO fencing. 15986 meter distance to next station 105. OK: bike 1545 locked confirmed";
NotAtStationException exception = null;
Assert.That(() => NotAtStationException.IsNotAtStation(responseText, out exception),
Is.EqualTo(true));
Assert.That(() => exception.StationNr,
Is.EqualTo(105));
Assert.That(() => exception.Distance,
Is.EqualTo(15986));
}
[Test]
public void TestIsNotAtStation_InvalidNr()
{
const string responseText = "Failure 2177: bike 1545 out of GEO fencing. 15986 meter distance to next station 105. OK: bike 1545 locked confirmed";
NotAtStationException exception = null;
Assert.That(() => NotAtStationException.IsNotAtStation(responseText, out exception),
Is.EqualTo(false));
}
}
}

View file

@ -38,9 +38,6 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Fixtures\ObjectTests\Repository\Exception\TestBookingDeclinedException.cs" />
<Compile Include="Fixtures\ObjectTests\Repository\Exception\TestNoGPSDataException.cs" />
<Compile Include="Fixtures\ObjectTests\Repository\Exception\TestNotAtStationException.cs" />
<Compile Include="Fixtures\ObjectTests\Services\BluetoothLock\Tdo\TestLockInfoAuthTdo.cs" />
<Compile Include="Fixtures\ObjectTests\Services\TestLocksServicesContainerMutable.cs" />
<Compile Include="Fixtures\ObjectTests\Services\TestServicesContainerMutable.cs" />