sharee.bike-App/TestFramework/Services/CopriApi/CopriCallsCacheMemory001.cs
Anja Müller-Meißner 573fe77e12 Version 3.0.337
2022-08-30 15:42:25 +02:00

126 lines
4.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using TestFramework.Repository;
using TINK.Model.Device;
using TINK.Model.Services.CopriApi;
using TINK.Repository.Request;
using TINK.Repository.Response;
namespace TestFramework.Services.CopriApi.Connector
{
/// <summary> Allows use of memory for retrieving defined respones.</summary>
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<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<ResponseBase> StartReturningBike(
string bikeId,
Uri operatorUri)
=> null;
public Task<ReservationBookingResponse> UpdateLockingStateAsync(
string bikeId,
lock_state state,
Uri operatorUri,
LocationDto geolocation,
double batteryPercentage)
=> throw new NotImplementedException();
public Task<ReservationBookingResponse> DoBookAsync(string bikeId, Guid guid, double batteryPercentage, Uri operatorUri)
=> throw new NotImplementedException();
public Task<ReservationBookingResponse> BookAvailableAndStartOpeningAsync(string bikeId, Uri operatorUri)
=> throw new NotImplementedException();
public Task<ReservationBookingResponse> BookReservedAndStartOpeningAsync(string bikeId, Uri operatorUri)
=> throw new NotImplementedException();
public Task<DoReturnResponse> DoReturn(string bikeId, LocationDto location, ISmartDevice smartDevice, Uri operatorUri)
=> throw new NotImplementedException();
public Task<DoReturnResponse> ReturnAndStartClosingAsync(
string bikeId,
ISmartDevice smartDevice,
Uri operatorUri)
=> throw new NotImplementedException();
public Task<SubmitFeedbackResponse> DoSubmitFeedback(string bikeId, int? currentChargeBars, string message, bool isBikeBroken, Uri operatorUri)
=> throw new NotImplementedException();
/// <summary> Submits mini survey to copri server. </summary>
/// <param name="answers">Collection of answers.</param>
public Task<ResponseBase> DoSubmitMiniSurvey(IDictionary<string, string> answers)
=> throw new NotImplementedException();
public Task<BikesAvailableResponse> GetBikesAvailableAsync()
{
return server.GetBikesAvailableAsync();
}
public Task<BikesReservedOccupiedResponse> GetBikesOccupiedAsync()
{
return server.GetBikesOccupiedAsync();
}
public Task<StationsAvailableResponse> GetStationsAsync()
{
return server.GetStationsAsync();
}
}
}