sharee.bike-App/SharedBusinessLogic.Tests_old/UseCases/ConnectedOffline/TestShareeBikeApp.cs

44 lines
1.6 KiB
C#
Raw Normal View History

2023-02-22 14:03:35 +01:00
using System;
2022-08-30 15:42:25 +02:00
using NUnit.Framework;
2024-04-09 12:53:23 +02:00
using ShareeBike.Model;
using ShareeBike.Repository;
2021-07-12 21:31:46 +02:00
2024-04-09 12:53:23 +02:00
namespace SharedBusinessLogic.Tests.Fixtures.UseCases.ConnectedOffline
2021-07-12 21:31:46 +02:00
{
2022-09-06 16:08:19 +02:00
using NSubstitute;
using Plugin.BLE.Abstractions.Contracts;
2024-04-09 12:53:23 +02:00
using ShareeBike.Model.Connector;
using ShareeBike.Services;
using ShareeBike.Services.Geolocation;
using ShareeBike.Services.Permissions;
2021-07-12 21:31:46 +02:00
2022-09-06 16:08:19 +02:00
[TestFixture]
2024-04-09 12:53:23 +02:00
public class TestShareeBikeApp
2022-09-06 16:08:19 +02:00
{
[Test, Explicit("Draft")]
public void TestConstruct()
{
const string MERCH_ID = "MyMerchId";
2022-08-30 15:42:25 +02:00
2024-04-09 12:53:23 +02:00
var l_oApp = new ShareeBikeApp(
new ShareeBike.Model.Settings.Settings(
2022-09-06 16:08:19 +02:00
activeLockService: typeof(LocksServiceMock).FullName,
activeGeolocationService: typeof(GeolocationMock).FullName),
new StoreMock(),
isConnectedFunc: () => true,
2023-02-22 14:03:35 +01:00
connectorFactory: (isConnected, uri, sessionCookie, mail, expiresAfter) => new ConnectorCache(new AppContextInfo(MERCH_ID, "MyApp", new Version(1, 2)), null /*UI language */, sessionCookie, mail, server: new CopriCallsMemory(MERCH_ID, SampleSets.Set2, 1)),
2022-09-06 16:08:19 +02:00
merchantId: MERCH_ID,
bluetoothService: Substitute.For<IBluetoothLE>(),
locationPermissionsService: Substitute.For<ILocationPermission>(),
2023-04-05 15:02:10 +02:00
locationServicesContainer: Substitute.For<IServicesContainer<IGeolocationService>>(),
2022-09-06 16:08:19 +02:00
locksService: new LocksServiceMock(), // Cipher
device: new DeviceMock(),
specialFolder: new SpecialFolderMock(),
cipher: null,
theme: null,
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
}
}
2021-07-12 21:31:46 +02:00
}