using System.Threading.Tasks;
using TINK.Model.Bike;
using TINK.Model.User;
namespace TestFramework
{
///
/// Provides helper functionality. Used in TestShareeLib and TestTINKLib.
///
public static class TestHelper
{
///
/// Eases comparison of xml- files.
///
///
///
public static string PrepareXmlForStringCompare(string p_strXmlFile)
{
return p_strXmlFile.Replace("\r\n", string.Empty).Replace("\t", string.Empty).Replace(" ", string.Empty);
}
///
/// Get all bikes at a given station from copri.
///
public static async Task 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(TINK.Model.BikeCollectionFilter.GetAtStation(l_oBikesAvailable, selectedStation));
return l_oBikesAtStation;
}
}
}