public void VmShouldNotDisposeInnerCommandIfSettingsFalse()
        {
            ViewModelBase viewModel = GetViewModelBase();
            var viewModelBaseWithCommand = viewModel.GetViewModel<ViewModelBaseWithCommand>();
            viewModelBaseWithCommand.Settings.DisposeCommands = false;
            var withoutGetter = new RelayCommandMock();
            var command = new RelayCommandMock();

            viewModelBaseWithCommand.NullCommand = null;
            viewModelBaseWithCommand.Command = command;
            viewModelBaseWithCommand.CommandWithoutGetter = withoutGetter;
            viewModelBaseWithCommand.Dispose();
            command.IsDisposed.ShouldBeFalse();
            withoutGetter.IsDisposed.ShouldBeFalse();
            viewModelBaseWithCommand.IsDisposed.ShouldBeTrue();
        }
        public void ProviderShouldUpdateCloseCommandToOldValue()
        {
            ViewPageMappingProvider.FindMappingForView = (type, b) => PageMapping;
            var relayCommandMock = new RelayCommandMock();
            var viewModel = GetViewModel<NavigableViewModelMock>();
            viewModel.CloseCommand = relayCommandMock;


            NavigationService.OnNavigated(new NavigationEventArgsMock(new ViewMock { DataContext = viewModel }, NavigationMode.New));
            viewModel.CloseCommand.ShouldNotEqual(relayCommandMock);

            NavigationService.OnNavigated(new NavigationEventArgsMock(null, NavigationMode.Back));
            viewModel.CloseCommand.ShouldEqual(relayCommandMock);
        }