using System;
using System.Threading.Tasks;
using TINK.Model.Services.CopriApi;
using TINK.Repository.Response;
using TINK.Repository.Request;
using TINK.Model.Device;
using System.Collections.Generic;
using TestFramework.Repository;
namespace TestFramework.Services.CopriApi.Connector
{
/// Allows use of memory for retrieving defined respones.
public class CopriCallsCacheMemory001 : ICopriCache
{
private CopriCallsMemory001 server;
public CopriCallsCacheMemory001(string sessionCookie = null)
{
server = new CopriCallsMemory001(sessionCookie);
}
public bool IsStationsExpired => true;
public bool IsBikesAvailableExpired => true;
public bool IsBikesOccupiedExpired => true;
public bool IsConnected => server.IsConnected;
public string SessionCookie => server.SessionCookie;
public string MerchantId => server.MerchantId;
public void AddToCache(StationsAvailableResponse stations)
{
return;
}
public void AddToCache(BikesAvailableResponse bikes)
{
return;
}
public void AddToCache(BikesReservedOccupiedResponse bikes)
{
return;
}
public Task DoAuthorizationAsync(string p_strMailAddress, string p_strPassword, string p_strDeviceId)
{
throw new NotImplementedException();
}
public Task DoAuthoutAsync()
{
throw new NotImplementedException();
}
public Task DoReserveAsync(string bikeId, Uri operatorUri)
{
throw new NotImplementedException();
}
public Task DoCancelReservationAsync(string p_iBikeId, Uri operatorUri)
{
throw new NotImplementedException();
}
public Task CalculateAuthKeysAsync(string bikeId, Uri operatorUri)
=> throw new NotSupportedException();
public Task StartReturningBike(
string bikeId,
Uri operatorUri)
=> null;
public Task UpdateLockingStateAsync(
string bikeId,
lock_state state,
Uri operatorUri,
LocationDto geolocation,
double batteryPercentage)
=> throw new NotImplementedException();
public Task DoBookAsync(string bikeId, Guid guid, double batteryPercentage, Uri operatorUri)
=> throw new NotImplementedException();
public Task BookAndStartOpeningAsync(string bikeId, Uri operatorUri)
=> throw new NotImplementedException();
public Task DoReturn(string bikeId, LocationDto location, ISmartDevice smartDevice, Uri operatorUri)
=> throw new NotImplementedException();
public Task ReturnAndStartClosingAsync(
string bikeId,
ISmartDevice smartDevice,
Uri operatorUri)
=> throw new NotImplementedException();
public Task DoSubmitFeedback(string bikeId, string message, bool isBikeBroken, Uri operatorUri)
=> throw new NotImplementedException();
/// Submits mini survey to copri server.
/// Collection of answers.
public Task DoSubmitMiniSurvey(IDictionary answers)
=> throw new NotImplementedException();
public Task GetBikesAvailableAsync()
{
return server.GetBikesAvailableAsync();
}
public Task GetBikesOccupiedAsync()
{
return server.GetBikesOccupiedAsync();
}
public Task GetStationsAsync()
{
return server.GetStationsAsync();
}
}
}