sharee.bike-App/TestTINKLib/Fixtures/UseCases/TestHelper.cs
Anja Müller-Meißner 573fe77e12 Version 3.0.337
2022-08-30 15:42:25 +02:00

31 lines
891 B
C#

using System.Collections.Generic;
using System.Threading.Tasks;
using TINK.Model;
using TINK.Model.Bikes;
using TINK.Model.Station;
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,
IEnumerable<IStation> stations,
string selectedStationId)
{
var l_oBikesAtStation = new BikeCollectionMutable();
var l_oBikesAvailable = (await connector.Query.GetBikesAsync()).Response;
l_oBikesAtStation.Update(l_oBikesAvailable.GetAtStation(selectedStationId), stations);
return l_oBikesAtStation;
}
}
}