using NUnit.Framework; using Rhino.Mocks; using System; using TestFramework.Model.Services.Geolocation; using TestFramework.Services.BluetoothLock; using TINK.Model.Device; using TINK.Model.User; using TINK.ViewModel; using TINK.ViewModel.Bikes; using TINK.ViewModel.Bikes.Bike; namespace TestTINKLib.Fixtures.ObjectTests.ViewModel { [TestFixture] public class TestBikeViewModelFactory { [Test] public void TestCreate() { Assert.AreEqual( typeof(TINK.ViewModel.Bikes.Bike.BC.BikeViewModel), BikeViewModelFactory.Create( () => false, // Is connected delegate, (isconnected) => null, // connectorFactory new GeolocationMock(), // geolocation new LocksServiceMock(), // lock service (index) => { }, // bikeRemoveDelegate null, // viewUpdateManager NSubstitute.Substitute.For(), null, // viewService new TINK.Model.Bike.BC.BikeInfoMutable(new TINK.Model.Bike.BluetoothLock.BikeInfo("42", 5200544, new Guid("00000000-0000-0000-0000-000000000001"), "42"), "My Station Name"), MockRepository.GenerateStub(), // user MockRepository.GenerateStub(), MockRepository.GenerateStub()).GetType()); // stateInfoProvider Assert.AreEqual( typeof(TINK.ViewModel.Bikes.Bike.BluetoothLock.BikeViewModel), BikeViewModelFactory.Create( () => false, // Is connected delegate, (isconnected) => null, // connectorFactory new GeolocationMock(), // geolocation new LocksServiceMock(), // lock service (index) => { }, // bikeRemoveDelegate null, // viewUpdateManager NSubstitute.Substitute.For(), null, // viewService new TINK.Model.Bike.BluetoothLock.BikeInfoMutable(new TINK.Model.Bike.BluetoothLock.BikeInfo("42", 5200544, new Guid("00000000-0000-0000-0000-000000000001"), "42"), "My Station Name"), MockRepository.GenerateStub(), // user MockRepository.GenerateStub(), MockRepository.GenerateStub()).GetType()); // stateInfoProvider } } }