Version 3.0.338

This commit is contained in:
Anja Müller-Meißner 2022-09-06 16:08:19 +02:00 committed by Anja
parent 573fe77e12
commit 0468955d49
751 changed files with 62747 additions and 60672 deletions

View file

@ -8,79 +8,79 @@ using TINK.Services.BluetoothLock.Tdo;
namespace TestFramework.Services.BluetoothLock
{
public class LocksServiceMock : ILocksService
{
/// <param name="connectTimeout">Timeout for connect operation of a single lock.</param>
public async Task<IEnumerable<LockInfoTdo>> GetLocksStateAsync(IEnumerable<LockInfoAuthTdo> locksInfo, TimeSpan connectTimeout)
{
return await Task.FromResult(new List<LockInfoTdo>());
}
public class LocksServiceMock : ILocksService
{
/// <param name="connectTimeout">Timeout for connect operation of a single lock.</param>
public async Task<IEnumerable<LockInfoTdo>> GetLocksStateAsync(IEnumerable<LockInfoAuthTdo> locksInfo, TimeSpan connectTimeout)
{
return await Task.FromResult(new List<LockInfoTdo>());
}
/// <summary> Holds timeout values for series of connecting attemps to a lock or multiple locks. </summary>
public ITimeOutProvider TimeOut { get; set; }
/// <summary> Holds timeout values for series of connecting attemps to a lock or multiple locks. </summary>
public ITimeOutProvider TimeOut { get; set; }
public void UpdateSimulation(BikeCollection bikes) { }
public void UpdateSimulation(BikeCollection bikes) { }
/// <summary> Opens lock.</summary>
/// <param name="bike">Bike object to update.</param>
public async Task<LockitLockingState?> OpenAsync(int lockId, byte[] copriKey) => await Task.FromResult(LockitLockingState.Open);
/// <summary> Opens lock.</summary>
/// <param name="bike">Bike object to update.</param>
public async Task<LockitLockingState?> OpenAsync(int lockId, byte[] copriKey) => await Task.FromResult(LockitLockingState.Open);
/// <summary> Closes lock.</summary>
/// <param name="bike">Bike object to update.</param>
public async Task<LockitLockingState?> CloseAsync(int lockId, byte[] copriKey) => await Task.FromResult(LockitLockingState.Closed);
/// <summary> Closes lock.</summary>
/// <param name="bike">Bike object to update.</param>
public async Task<LockitLockingState?> CloseAsync(int lockId, byte[] copriKey) => await Task.FromResult(LockitLockingState.Closed);
/// <summary> Gets the state of a bike. </summary>
/// <param name="lockId">Id of lockId to get state for.</param>
/// <returns></returns>
public async Task<LockitLockingState?> GetState(string lockId) => await Task.FromResult((LockitLockingState?)null);
/// <summary> Gets the state of a bike. </summary>
/// <param name="lockId">Id of lockId to get state for.</param>
/// <returns></returns>
public async Task<LockitLockingState?> GetState(string lockId) => await Task.FromResult((LockitLockingState?)null);
/// <summary> Connects to lock.</summary>
/// <param name="authInfo"> Info required to connect to lock.</param>
/// <param name="connectTimeout">Timeout for connect operation.</param>
public async Task<LockInfoTdo> ConnectAsync(LockInfoAuthTdo authInfo, TimeSpan connectTimeout)
{
return await Task.FromResult(new LockInfoTdo.Builder { Id = 12, Guid = new System.Guid("00000000-0000-0000-0000-000000000042"), State = null }.Build());
}
/// <summary> Connects to lock.</summary>
/// <param name="authInfo"> Info required to connect to lock.</param>
/// <param name="connectTimeout">Timeout for connect operation.</param>
public async Task<LockInfoTdo> ConnectAsync(LockInfoAuthTdo authInfo, TimeSpan connectTimeout)
{
return await Task.FromResult(new LockInfoTdo.Builder { Id = 12, Guid = new System.Guid("00000000-0000-0000-0000-000000000042"), State = null }.Build());
}
/// <summary> Set sound settings.</summary>
/// <param name="lockId">Id of lock to set sound settings.</param>
public async Task<bool> SetSoundAsync(int lockId, SoundSettings settings)
{
return await Task.FromResult(true);
}
/// <summary> Set sound settings.</summary>
/// <param name="lockId">Id of lock to set sound settings.</param>
public async Task<bool> SetSoundAsync(int lockId, SoundSettings settings)
{
return await Task.FromResult(true);
}
/// <summary> Gets battery percentage.</summary>
/// <param name="lockId">Id of lock to get info for.</param>
public Task<double> GetBatteryPercentageAsync(int lockId)
{
throw new NotSupportedException();
}
/// <summary> Gets battery percentage.</summary>
/// <param name="lockId">Id of lock to get info for.</param>
public Task<double> GetBatteryPercentageAsync(int lockId)
{
throw new NotSupportedException();
}
/// <summary> Sets whether alarm is on or off.</summary>
/// <param name="lockId">Id of lock to get info from.</param>
public async Task SetIsAlarmOffAsync(int lockId, bool activated)
{
await Task.FromResult(true);
}
/// <summary> Sets whether alarm is on or off.</summary>
/// <param name="lockId">Id of lock to get info from.</param>
public async Task SetIsAlarmOffAsync(int lockId, bool activated)
{
await Task.FromResult(true);
}
/// <summary> Gets whether alarm is on or off.</summary>
/// <param name="lockId">Id of lock to get info for.</param>
public async Task<bool> GetIsAlarmOffAsync(int lockId)
{
return await Task.FromResult(true);
}
/// <summary> Gets whether alarm is on or off.</summary>
/// <param name="lockId">Id of lock to get info for.</param>
public async Task<bool> GetIsAlarmOffAsync(int lockId)
{
return await Task.FromResult(true);
}
/// <summary>Gets a lock by bike Id.</summary>
/// <param name="bikeId"></param>
/// <returns>Lock object</returns>
public ILockService this[int bikeId]
{
get
{
return null;
}
}
/// <summary>Gets a lock by bike Id.</summary>
/// <param name="bikeId"></param>
/// <returns>Lock object</returns>
public ILockService this[int bikeId]
{
get
{
return null;
}
}
public Task<LockingState> DisconnectAsync(int bikeId, Guid bikeGuid) => throw new NotSupportedException();
}
public Task<LockingState> DisconnectAsync(int bikeId, Guid bikeGuid) => throw new NotSupportedException();
}
}

View file

@ -9,118 +9,118 @@ 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;
/// <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 CopriCallsCacheMemory001(string sessionCookie = null)
{
server = new CopriCallsMemory001(sessionCookie);
}
public bool IsStationsExpired => true;
public bool IsStationsExpired => true;
public bool IsBikesAvailableExpired => true;
public bool IsBikesAvailableExpired => true;
public bool IsBikesOccupiedExpired => true;
public bool IsBikesOccupiedExpired => true;
public bool IsConnected => server.IsConnected;
public bool IsConnected => server.IsConnected;
public string SessionCookie => server.SessionCookie;
public string SessionCookie => server.SessionCookie;
public string MerchantId => server.MerchantId;
public string MerchantId => server.MerchantId;
public void AddToCache(StationsAvailableResponse stations)
{
return;
}
public void AddToCache(StationsAvailableResponse stations)
{
return;
}
public void AddToCache(BikesAvailableResponse bikes)
{
return;
}
public void AddToCache(BikesAvailableResponse bikes)
{
return;
}
public void AddToCache(BikesReservedOccupiedResponse 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<AuthorizationResponse> DoAuthorizationAsync(string p_strMailAddress, string p_strPassword, string p_strDeviceId)
{
throw new NotImplementedException();
}
public Task<AuthorizationoutResponse> DoAuthoutAsync()
{
throw new NotImplementedException();
}
public Task<AuthorizationoutResponse> DoAuthoutAsync()
{
throw new NotImplementedException();
}
public Task<ReservationBookingResponse> DoReserveAsync(string bikeId, Uri operatorUri)
{
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<ReservationCancelReturnResponse> DoCancelReservationAsync(string p_iBikeId, Uri operatorUri)
{
throw new NotImplementedException();
}
public Task<ReservationBookingResponse> CalculateAuthKeysAsync(string bikeId, Uri operatorUri)
=> throw new NotSupportedException();
public Task<ReservationBookingResponse> CalculateAuthKeysAsync(string bikeId, Uri operatorUri)
=> throw new NotSupportedException();
public Task<ResponseBase> StartReturningBike(
string bikeId,
Uri operatorUri)
=> null;
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> 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> 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> BookAvailableAndStartOpeningAsync(string bikeId, Uri operatorUri)
=> throw new NotImplementedException();
public Task<ReservationBookingResponse> BookReservedAndStartOpeningAsync(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> 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<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();
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();
/// <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<BikesAvailableResponse> GetBikesAvailableAsync()
{
return server.GetBikesAvailableAsync();
}
public Task<BikesReservedOccupiedResponse> GetBikesOccupiedAsync()
{
return server.GetBikesOccupiedAsync();
}
public Task<BikesReservedOccupiedResponse> GetBikesOccupiedAsync()
{
return server.GetBikesOccupiedAsync();
}
public Task<StationsAvailableResponse> GetStationsAsync()
{
return server.GetStationsAsync();
}
}
public Task<StationsAvailableResponse> GetStationsAsync()
{
return server.GetStationsAsync();
}
}
}

View file

@ -6,17 +6,17 @@ using Xamarin.Essentials;
namespace TestFramework.Model.Services.Geolocation
{
public class GeolocationMock : IGeolocation
{
public class GeolocationMock : IGeolocation
{
public Task<Location> GetAsync(CancellationToken? cancelToken = null, DateTime? timeStamp = null)
{
throw new NotImplementedException();
}
public Task<Location> GetAsync(CancellationToken? cancelToken = null, DateTime? timeStamp = null)
{
throw new NotImplementedException();
}
/// <summary> If true location data returned is simulated.</summary>
public bool IsSimulation { get => true; }
/// <summary> If true location data returned is simulated.</summary>
public bool IsSimulation { get => true; }
public bool IsGeolcationEnabled => true;
}
public bool IsGeolcationEnabled => true;
}
}