mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-05-07 10:56:41 +02:00
Version 3.0.371
This commit is contained in:
parent
bdb2dec1c1
commit
6d22dbf40b
145 changed files with 2289 additions and 764 deletions
|
@ -10,6 +10,7 @@ using TINK.Model.Connector;
|
|||
using TINK.Model.Device;
|
||||
using TINK.Model.State;
|
||||
using TINK.Model.User;
|
||||
using TINK.Repository.Request;
|
||||
using TINK.Services.BluetoothLock;
|
||||
using TINK.Services.Geolocation;
|
||||
using static TINK.Model.Bikes.BikeInfoNS.BluetoothLock.Command.GetLockedLocationCommand;
|
||||
|
@ -199,5 +200,39 @@ namespace TestShareeLib.Model.Bikes.BikeInfoNS.BluetoothLock.Command
|
|||
await listener.ReportStateAsync(State.QueryLocationSucceeded, string.Empty);
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Use case: End rental.
|
||||
/// Final state: Disposable closed
|
||||
/// </summary>
|
||||
[Test]
|
||||
public async Task TestReturnClosingLockLocationAvailable()
|
||||
{
|
||||
var bike = Substitute.For<IBikeInfoMutable>();
|
||||
var geolocation = Substitute.For<IGeolocationService>();
|
||||
var locks = Substitute.For<ILocksService>();
|
||||
var listener = Substitute.For<IGetLockedLocationCommandListener>();
|
||||
|
||||
var closingLockLocation = Substitute.For<IGeolocation>();
|
||||
closingLockLocation.Latitude.Returns(7);
|
||||
closingLockLocation.Longitude.Returns(9);
|
||||
closingLockLocation.Timestamp.Returns(DateTimeOffset.MinValue);
|
||||
|
||||
bike.LockInfo.Location.Returns((IGeolocation)closingLockLocation); // When locking bike geolocation was available.
|
||||
|
||||
var lockingLocation = await InvokeAsync<TestGetBikeLocationCommand>(
|
||||
bike,
|
||||
geolocation,
|
||||
locks,
|
||||
() => DateTime.MinValue,
|
||||
listener);
|
||||
|
||||
// Verify behavior
|
||||
Received.InOrder(() =>
|
||||
{
|
||||
listener.ReportStep(Step.StartingQueryLocation);
|
||||
return;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue