mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-16 15:16:34 +01:00
29 lines
786 B
C#
29 lines
786 B
C#
|
using System;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using TINK.Model;
|
|||
|
using TINK.Model.Bike;
|
|||
|
using TINK.Model.User;
|
|||
|
|
|||
|
namespace TestTINKLib.Fixtures.UseCases
|
|||
|
{
|
|||
|
public class TestHelper
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// Get all bikes at a given station from copri.
|
|||
|
/// </summary>
|
|||
|
public static async Task<BikeCollectionMutable> GetBikesAtStation(
|
|||
|
User user,
|
|||
|
TINK.Model.Connector.IConnector connector,
|
|||
|
string selectedStation)
|
|||
|
{
|
|||
|
var l_oBikesAtStation = new BikeCollectionMutable();
|
|||
|
|
|||
|
var l_oBikesAvailable = (await connector.Query.GetBikesAsync()).Response;
|
|||
|
|
|||
|
l_oBikesAtStation.Update(l_oBikesAvailable.GetAtStation(selectedStation));
|
|||
|
|
|||
|
return l_oBikesAtStation;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|