mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-21 20:46:28 +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,70 @@
|
|||
using NUnit.Framework;
|
||||
using System;
|
||||
using TINK.Repository.Exception;
|
||||
using TINK.Repository.Request;
|
||||
|
||||
namespace UITest.Fixtures.ObjectTests.Connector.Request
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestRequestBuilder
|
||||
{
|
||||
[Test]
|
||||
public void TestDoAuthorize()
|
||||
{
|
||||
Assert.AreEqual(
|
||||
"request=authorization&merchant_id=123&user_id=abc%40cde&user_pw=%2B%3F&hw_id=789",
|
||||
new RequestBuilder("123").DoAuthorization("abc@cde", "+?", "789"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestDoAuthout()
|
||||
{
|
||||
Assert.Throws<CallNotRequiredException>(() =>
|
||||
new RequestBuilder("123").DoAuthout());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestGetBikesAvailable()
|
||||
{
|
||||
Assert.AreEqual(
|
||||
"request=bikes_available&system=all&authcookie=123",
|
||||
new RequestBuilder("123").GetBikesAvailable());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestGetBikesOccupied()
|
||||
{
|
||||
Assert.Throws< NotSupportedException>(() =>
|
||||
new RequestBuilder("123").GetBikesOccupied());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestGetStations()
|
||||
{
|
||||
Assert.AreEqual(
|
||||
"request=stations_available&authcookie=123",
|
||||
new RequestBuilder("123").GetStations());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestDoReserve()
|
||||
{
|
||||
Assert.Throws<NotSupportedException>(() =>
|
||||
new RequestBuilder("123").DoReserve("42"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestDoCancelReservation()
|
||||
{
|
||||
Assert.Throws<NotSupportedException>(() =>
|
||||
new RequestBuilder("123").DoCancelReservation("42"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestDoSubmitFeedback()
|
||||
{
|
||||
Assert.Throws<NotSupportedException>(() =>
|
||||
new RequestBuilder("123").DoSubmitFeedback("bike3", "Hi", false));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue