sharee.bike-App/TestTINKLib/Fixtures/UseCases/ConnectedOffline/TestTinkApp.cs

44 lines
1.7 KiB
C#
Raw Normal View History

2021-07-12 21:31:46 +02:00
using NUnit.Framework;
using System;
using TINK.Model;
using TINK.Repository;
2021-11-14 23:27:29 +01:00
using TestFramework.Model.Device;
2021-07-12 21:31:46 +02:00
namespace TestTINKLib.Fixtures.UseCases.ConnectedOffline
{
using NSubstitute;
2021-11-14 23:27:29 +01:00
using TestFramework.Model.Services.Geolocation;
using TestFramework.Model.User.Account;
using TestFramework.Services.BluetoothLock;
2021-12-08 17:57:30 +01:00
using TestFramework.Services.Permissions;
2021-07-12 21:31:46 +02:00
using TINK.Model.Connector;
using TINK.Model.Services.Geolocation;
using TINK.Services;
using static TINK.Repository.CopriCallsMemory;
[TestFixture]
public class TestTinkApp
{
[Test, Explicit("Draft")]
public void TestConstruct()
{
var l_oApp = new TinkApp(
new TINK.Model.Settings.Settings(
activeLockService: typeof(LocksServiceMock).FullName,
activeGeolocationService: typeof(GeolocationMock).FullName),
new StoreMock(),
2022-01-04 18:59:16 +01:00
(isConnected, uri, sessionCookie, mail, expiresAfter) => new ConnectorCache(new AppContextInfo("MyMerchId", "MyApp", new Version(1, 2)), sessionCookie, mail, new CopriCallsMemory(SampleSets.Set2, 1)),
"MyMerchId",
2021-07-12 21:31:46 +02:00
Substitute.For<IServicesContainer<IGeolocation>>(),
new LocksServiceMock(),
new DeviceMock(),
new SpecialFolderMock(),
null, // Cipher
2021-12-08 17:58:06 +01:00
new PermissionsMock(),
2021-07-12 21:31:46 +02:00
isConnectedFunc: () => true,
currentVersion: new Version(3, 2, 0, 115), // Current app version
lastVersion: new Version(3, 0, 173)); // Current app version. Must be larger or equal 3.0.173 to
}
}
}