Version 3.0.262

This commit is contained in:
ohauff 2021-11-21 12:34:25 +01:00
parent 3fed2707cd
commit b6bee60e60
42 changed files with 4633 additions and 1030 deletions

View file

@ -9,8 +9,6 @@ using TINK.Model.Services.Geolocation;
using TINK.Services.BluetoothLock;
using TINK.Model.Device;
using TINK.Model.User.Account;
using Plugin.Permissions.Abstractions;
using TestShareeLib.Repository;
using TestFramework.Repository;
@ -26,7 +24,6 @@ namespace TestTINKLib.Fixtures.UseCases.Logout
var locksService = Substitute.For<ILocksService>();
var device = Substitute.For<ISmartDevice>();
var specialFolder = Substitute.For<ISpecialFolder>();
var permissions = Substitute.For<IPermissions>();
var account = Substitute.For<IAccount>();
accountStore.Load().Returns(account);
@ -42,14 +39,13 @@ namespace TestTINKLib.Fixtures.UseCases.Logout
activeUri: new Uri(CopriServerUriList.TINK_DEVEL)),
accountStore,
(isConnected, uri, sessionCookie, mail, expiresAfter) => string.IsNullOrEmpty(sessionCookie)
? new ConnectorCache(sessionCookie, mail, new CopriCallsMemory001())
: new ConnectorCache(sessionCookie, mail, new CopriCallsMemory001(sessionCookie)),
? new ConnectorCache(sessionCookie, mail, new TestShareeLib.Repository.CopriCallsMemory001())
: new ConnectorCache(sessionCookie, mail, new TestShareeLib.Repository.CopriCallsMemory001(sessionCookie)),
Substitute.For<IServicesContainer<IGeolocation>>(),
locksService,
device,
specialFolder,
null, // Cipher
permissions,
isConnectedFunc: () => true,
currentVersion: new Version(3, 2, 0, 115),
lastVersion: new Version(3, 0, 173)); // Current app version. Must be larger or equal 3.0.173 to
@ -57,7 +53,7 @@ namespace TestTINKLib.Fixtures.UseCases.Logout
Assert.IsTrue(l_oTinkApp.ActiveUser.IsLoggedIn);
// There are 6 bikes available and 2, one reserved and one rented by javaminsiter.
Assert.AreEqual(
10,
8,
l_oTinkApp.GetConnector(true).Query.GetBikesAsync().Result.Response.Count,
"Sum of bikes is 6 occupied plus 2 occupied.");
Assert.AreEqual(2,
@ -71,7 +67,7 @@ namespace TestTINKLib.Fixtures.UseCases.Logout
Assert.IsFalse(l_oTinkApp.ActiveUser.IsLoggedIn);
Assert.AreEqual(
8,
6,
l_oTinkApp.GetConnector(true).Query.GetBikesAsync().Result.Response.Count,
"Sum of bikes is 6 occupied, no one occupied because no user is logged in");
Assert.AreEqual(

View file

@ -9,7 +9,6 @@ using TINK.Model.Services.Geolocation;
using TINK.Services.BluetoothLock;
using TINK.Model.Device;
using TINK.Model.User.Account;
using Plugin.Permissions.Abstractions;
using System.Threading.Tasks;
using TestFramework.Repository;
@ -25,7 +24,6 @@ namespace TestShareeLib.UseCases.Login
var locksService = Substitute.For<ILocksService>();
var device = Substitute.For<ISmartDevice>();
var specialFolder = Substitute.For<ISpecialFolder>();
var permissions = Substitute.For<IPermissions>();
// No user logged in is initial state to verify.
var l_oTinkApp = new TinkApp(
@ -42,7 +40,6 @@ namespace TestShareeLib.UseCases.Login
device,
specialFolder,
null, // Cipher
permissions,
isConnectedFunc: () => true,
currentVersion: new Version(3, 2, 0, 115),
lastVersion: new Version(3, 0, 173) /* Current app version. Must be larger or equal 3.0.173 to lastVersion*/);