mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-06 02:56:32 +01:00
45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
|
using NSubstitute;
|
||
|
using NUnit.Framework;
|
||
|
using ShareeBike.Model.Bikes.BikeInfoNS.BluetoothLock;
|
||
|
using ShareeBike.Model.Connector;
|
||
|
using ShareeBike.Model.Device;
|
||
|
using ShareeBike.Model.User;
|
||
|
using ShareeBike.Services.BluetoothLock;
|
||
|
using ShareeBike.Services.Geolocation;
|
||
|
using ShareeBike.View;
|
||
|
using ShareeBike.ViewModel;
|
||
|
using ShareeBike.ViewModel.Bikes;
|
||
|
using ShareeBike.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler;
|
||
|
|
||
|
namespace SharedBusinessLogic.Tests.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
||
|
{
|
||
|
[TestFixture]
|
||
|
public class TestBookedOpen
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Test construction of object.
|
||
|
/// </summary>
|
||
|
[Test]
|
||
|
public void Testctor()
|
||
|
{
|
||
|
var handler = new BookedOpen(
|
||
|
Substitute.For<IBikeInfoMutable>(),
|
||
|
() => true, // isConnectedDelegate
|
||
|
(isConnected) => Substitute.For<IConnector>(),
|
||
|
Substitute.For<IGeolocationService>(),
|
||
|
Substitute.For<ILocksService>(),
|
||
|
() => Substitute.For<IPollingUpdateTaskManager>(),
|
||
|
Substitute.For<ISmartDevice>(),
|
||
|
Substitute.For<IViewService>(),
|
||
|
Substitute.For<IBikesViewModel>(),
|
||
|
Substitute.For<IUser>());
|
||
|
|
||
|
// Verify prerequisites.
|
||
|
Assert.That(handler.ButtonText, Is.EqualTo("Close lock"));
|
||
|
Assert.That(handler.IsButtonVisible, Is.True);
|
||
|
Assert.That(handler.LockitButtonText, Is.EqualTo("BookedOpen"));
|
||
|
Assert.That(handler.IsLockitButtonVisible, Is.False);
|
||
|
}
|
||
|
}
|
||
|
}
|