mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-25 22:16:34 +02:00
Legacy testing lib added..
This commit is contained in:
parent
0167fc321f
commit
47ed05837e
118 changed files with 17505 additions and 0 deletions
|
@ -0,0 +1,39 @@
|
|||
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));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue