sharee.bike-App/SharedBusinessLogic.Tests_old/UseCases/ConnectedOffline/TestShareeBikeApp.cs
2024-04-09 12:53:23 +02:00

43 lines
1.6 KiB
C#

using System;
using NUnit.Framework;
using ShareeBike.Model;
using ShareeBike.Repository;
namespace SharedBusinessLogic.Tests.Fixtures.UseCases.ConnectedOffline
{
using NSubstitute;
using Plugin.BLE.Abstractions.Contracts;
using ShareeBike.Model.Connector;
using ShareeBike.Services;
using ShareeBike.Services.Geolocation;
using ShareeBike.Services.Permissions;
[TestFixture]
public class TestShareeBikeApp
{
[Test, Explicit("Draft")]
public void TestConstruct()
{
const string MERCH_ID = "MyMerchId";
var l_oApp = new ShareeBikeApp(
new ShareeBike.Model.Settings.Settings(
activeLockService: typeof(LocksServiceMock).FullName,
activeGeolocationService: typeof(GeolocationMock).FullName),
new StoreMock(),
isConnectedFunc: () => true,
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)),
merchantId: MERCH_ID,
bluetoothService: Substitute.For<IBluetoothLE>(),
locationPermissionsService: Substitute.For<ILocationPermission>(),
locationServicesContainer: Substitute.For<IServicesContainer<IGeolocationService>>(),
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
}
}
}