コード例 #1
0
        public void ShouldSetCurrentCarViewModelToActiveRentalSessionViewModelWhenSendProperMessage()
        {
            var sut = new DriverMainViewModel(_messengerServiceMock, _rentCarViewModelMock, _activeRentalSessionViewModelMock, _driverAccountViewModelMock, _driverRentalsViewModelMock);

            Messenger.Default.Send(new NotificationMessage("Start Car Rental"));
            Assert.AreEqual(_activeRentalSessionViewModelMock, sut.CurrentRentCarViewModel);
        }
コード例 #2
0
        public void ShouldSetCurrentCarViewModelToRenCarViewModelUponInitialization()
        {
            var sut = new DriverMainViewModel(_messengerServiceMock, _rentCarViewModelMock, _activeRentalSessionViewModelMock, _driverAccountViewModelMock, _driverRentalsViewModelMock);

            Assert.AreEqual(_rentCarViewModelMock, sut.CurrentRentCarViewModel);
        }