mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-22 04:46:30 +02:00
Version 3.0.363
This commit is contained in:
parent
4ff3307997
commit
91d42552c7
212 changed files with 1799 additions and 1318 deletions
|
@ -7,6 +7,7 @@ using Newtonsoft.Json;
|
|||
using TINK.Repository;
|
||||
using TINK.Repository.Exception;
|
||||
using TINK.Repository.Response;
|
||||
using TINK.Repository.Response.Stations;
|
||||
|
||||
namespace UITest.Fixtures.Connector
|
||||
{
|
||||
|
@ -18,7 +19,7 @@ namespace UITest.Fixtures.Connector
|
|||
/// <summary> Logs user in. </summary>
|
||||
/// <param name="copriHost">Host to connect to. </param>
|
||||
/// <param name="merchantId">Id of the merchant.</param>
|
||||
/// <param name="mailAddress">Mailaddress of user to log in.</param>
|
||||
/// <param name="mailAddress">Mail address of user to log in.</param>
|
||||
/// <param name="password">Password to log in.</param>
|
||||
/// <param name="deviceId">Id specifying user and hardware.</param>
|
||||
/// <remarks>Response which holds auth cookie <see cref="ResponseBase.authcookie"/></remarks>
|
||||
|
@ -134,7 +135,7 @@ namespace UITest.Fixtures.Connector
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of bikes reserved/ booked by acctive user from Copri.
|
||||
/// Gets a list of bikes reserved/ booked by active user from Copri.
|
||||
/// </summary>
|
||||
/// <param name="merchantId">Id of the merchant.</param>
|
||||
/// <param name="p_strSessionCookie">Cookie to authenticate user.</param>
|
||||
|
@ -190,7 +191,7 @@ namespace UITest.Fixtures.Connector
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets canel booking request response.
|
||||
/// Gets cancel booking request response.
|
||||
/// </summary>
|
||||
/// <param name="merchantId">Id of the merchant.</param>
|
||||
/// <param name="p_iBikeId">Id of the bike to book.</param>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
|
@ -330,7 +330,7 @@ namespace UITest.Fixtures.Connector
|
|||
Assert.Greater(
|
||||
bike.description.Length,
|
||||
0,
|
||||
"Bike despcription must never be empty.");
|
||||
"Bike description must never be empty.");
|
||||
|
||||
Assert.That(
|
||||
bike.bike,
|
||||
|
@ -391,7 +391,7 @@ namespace UITest.Fixtures.Connector
|
|||
Assert.Greater(
|
||||
bike.description.Length,
|
||||
0,
|
||||
"Bike despcription must never be empty.");
|
||||
"Bike description must never be empty.");
|
||||
|
||||
Assert.That(
|
||||
bike.bike,
|
||||
|
@ -405,7 +405,7 @@ namespace UITest.Fixtures.Connector
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attention: Behaves different if called with a period smaller 15minutes because bike will alreay be reserved.
|
||||
/// Attention: Behaves different if called with a period smaller 15minutes because bike will already be reserved.
|
||||
/// </summary>
|
||||
[Test, Explicit, Ignore("Avoid testrunner running explicit tests.")]
|
||||
public void TestDoReserveCall(
|
||||
|
@ -437,7 +437,7 @@ namespace UITest.Fixtures.Connector
|
|||
// State of bike for which to cancel booking must be available.
|
||||
Assert.NotNull(
|
||||
CopriCallsHttpsReference.GetBikesAvailableCall(url, TinkApp.MerchantId, TestTINKLib.LoginSessionCopriInfo.JavaministerHardwareNr1.AuthCookie)?.bikes?.FirstOrDefault(x => x.Value.bike == l_oBikeId).Value,
|
||||
"Prerequities check failed: Bike with given id must be available;");
|
||||
"Prerequisites check failed: Bike with given id must be available;");
|
||||
|
||||
var l_oBookingResponse = DoReserveAsync(
|
||||
CopriServerUriList.DevelopUri.AbsoluteUri,
|
||||
|
@ -457,7 +457,7 @@ namespace UITest.Fixtures.Connector
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attention: Behaves different if called with a period smaller 15minutes because bike will alreay be reserved.
|
||||
/// Attention: Behaves different if called with a period smaller 15minutes because bike will already be reserved.
|
||||
/// </summary>
|
||||
[Test, Explicit, Ignore("Avoid testrunner running explicit tests.")]
|
||||
public void TestDoCancelReservationCall(
|
||||
|
@ -490,7 +490,7 @@ namespace UITest.Fixtures.Connector
|
|||
var l_oBikeToCancel = CopriCallsHttpsReference.GetBikesAvailableCall(url, TinkApp.MerchantId, TestTINKLib.LoginSessionCopriInfo.JavaministerHardwareNr1.AuthCookie)?.bikes?.FirstOrDefault(x => x.Value.bike == l_oBikeId).Value;
|
||||
if (l_oBikeToCancel != null)
|
||||
{
|
||||
// Bike is avilable. Do request before unning test.
|
||||
// Bike is available. Do request before unning test.
|
||||
CopriCallsHttpsReference.DoReserveCall(url, TinkApp.MerchantId, l_oBikeId, TestTINKLib.LoginSessionCopriInfo.JavaministerHardwareNr1.AuthCookie);
|
||||
}
|
||||
|
||||
|
@ -579,7 +579,7 @@ namespace UITest.Fixtures.Connector
|
|||
string.Format("{0}{1}", TestTINKLib.LoginSessionCopriInfo.JavaministerHardwareNr1.AuthCookie, TinkApp.MerchantId),
|
||||
l_oBookingResponse.authcookie);
|
||||
|
||||
Assert.Greater(l_oBike.description.Length, 0, "Bike despcription must never be empty.");
|
||||
Assert.Greater(l_oBike.description.Length, 0, "Bike description must never be empty.");
|
||||
Assert.That(l_oBike.bike, Is.Not.Null, "Bike index must not be null.");
|
||||
Assert.That(
|
||||
l_oBike.station,
|
||||
|
|
|
@ -17,12 +17,13 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector
|
|||
[Test]
|
||||
public void TestGetStationsAll()
|
||||
{
|
||||
var appContextInfo = new AppContextInfo("MyMerchId", "MyApp", new Version(1, 2));
|
||||
var connector = new ConnectorCache(
|
||||
new AppContextInfo("MyMerchId", "MyApp", new Version(1, 2)),
|
||||
appContextInfo,
|
||||
null /*UI language */,
|
||||
string.Empty,
|
||||
string.Empty,
|
||||
server: new CopriCallsMemory001());
|
||||
server: new CopriCallsMemory001(merchantId: appContextInfo.MerchantId));
|
||||
|
||||
var filter = new FilteredConnector(new List<string> { FilterHelper.CARGOBIKE, FilterHelper.CITYBIKE }, connector);
|
||||
var stations = filter.Query.GetBikesAndStationsAsync().Result.Response;
|
||||
|
@ -53,12 +54,13 @@ namespace TestTINKLib.Fixtures.ObjectTests.Connector
|
|||
[Test]
|
||||
public void TestGetBikesAll()
|
||||
{
|
||||
var appContextInfo = new AppContextInfo("MyMerchId", "MyApp", new Version(1, 2));
|
||||
var l_oConnector = new ConnectorCache(
|
||||
new AppContextInfo("MyMerchId", "MyApp", new Version(1, 2)),
|
||||
appContextInfo,
|
||||
null /*UI language */,
|
||||
string.Empty,
|
||||
string.Empty,
|
||||
server: new CopriCallsMemory001());
|
||||
server: new CopriCallsMemory001(merchantId: appContextInfo.MerchantId));
|
||||
|
||||
var l_oFilter = new FilteredConnector(new List<string> { FilterHelper.CARGOBIKE, FilterHelper.CITYBIKE }, l_oConnector);
|
||||
var l_oBikes = l_oFilter.Query.GetBikesAsync().Result.Response;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue