mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-05 10:36:30 +01:00
106 lines
3.4 KiB
C#
106 lines
3.4 KiB
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using TINK.Model.Services.CopriApi;
|
|
using TINK.Repository;
|
|
using TINK.Repository.Response;
|
|
using static TINK.Repository.CopriCallsMemory;
|
|
using TINK.Repository.Request;
|
|
using TINK.Model.Device;
|
|
|
|
namespace TestTINKLib.Mocks.Connector
|
|
{
|
|
/// <summary> Allows use of memory for retrieving defined respones.</summary>
|
|
public class CopriCallsCacheMemory : ICopriCache
|
|
{
|
|
private CopriCallsMemory server;
|
|
|
|
public CopriCallsCacheMemory(
|
|
SampleSets? sampleSet = null,
|
|
int? index = null,
|
|
string sessionCookie = null)
|
|
{
|
|
server = new CopriCallsMemory(sampleSet, index, 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(StationsAllResponse stations)
|
|
{
|
|
return;
|
|
}
|
|
|
|
public void AddToCache(BikesAvailableResponse bikes)
|
|
{
|
|
return;
|
|
}
|
|
|
|
public void AddToCache(BikesReservedOccupiedResponse bikes)
|
|
{
|
|
return;
|
|
}
|
|
|
|
public Task<AuthorizationResponse> DoAuthorizationAsync(string p_strMailAddress, string p_strPassword, string p_strDeviceId)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<AuthorizationoutResponse> DoAuthoutAsync()
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<ReservationBookingResponse> DoReserveAsync(string bikeId, Uri operatorUri)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<ReservationCancelReturnResponse> DoCancelReservationAsync(string p_iBikeId, Uri operatorUri)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<ReservationBookingResponse> CalculateAuthKeysAsync(string bikeId, Uri operatorUri)
|
|
=> throw new NotSupportedException();
|
|
|
|
public Task<ReservationBookingResponse> UpdateLockingStateAsync(string bikeId, LocationDto geolocation, lock_state state, double batteryPercentage, Uri operatorUri)
|
|
=> throw new NotImplementedException();
|
|
|
|
public Task<ReservationBookingResponse> DoBookAsync(string bikeId, Guid guid, double batteryPercentage, Uri operatorUri)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<ReservationCancelReturnResponse> DoReturn(string bikeId, LocationDto location, ISmartDevice smartDevice, Uri operatorUri)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<SubmitFeedbackResponse> DoSubmitFeedback(string bikeId, string message, bool isBikeBroken, Uri operatorUri)
|
|
=> throw new NotImplementedException();
|
|
|
|
public Task<BikesAvailableResponse> GetBikesAvailableAsync()
|
|
{
|
|
return server.GetBikesAvailableAsync();
|
|
}
|
|
|
|
public Task<BikesReservedOccupiedResponse> GetBikesOccupiedAsync()
|
|
{
|
|
return server.GetBikesOccupiedAsync();
|
|
}
|
|
|
|
public Task<StationsAllResponse> GetStationsAsync()
|
|
{
|
|
return server.GetStationsAsync();
|
|
}
|
|
}
|
|
}
|