Version 3.0.371

This commit is contained in:
Anja 2023-08-31 12:31:38 +02:00
parent bdb2dec1c1
commit 6d22dbf40b
145 changed files with 2289 additions and 764 deletions

View file

@ -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;
});
}
}
}