예제 #1
0
 private static void Refresh()
 {
     OpenSettingsWindowCommand.NotifyCanExecuteChanged();
     AlignOnScreenFlyoutToDefaultPosition.NotifyCanExecuteChanged();
     PinUnpinFlyoutTopBarCommand.NotifyCanExecuteChanged();
     CloseFlyoutCommand.NotifyCanExecuteChanged();
     ExitAppCommand.NotifyCanExecuteChanged();
     ResetAppDataCommand.NotifyCanExecuteChanged();
 }
예제 #2
0
        public void ConstructionShouldBeEffectless()
        {
            // Arrange
            var appController = new Mock <IAppController>();

            appController.Setup(x => x.ExitApp()).Verifiable();

            // Act
            var command = new ExitAppCommand(appController.Object);

            // Assert
            appController.Verify(x => x.ExitApp(), Times.Never);
        }
예제 #3
0
        public void Exit()
        {
            // Arrange
            var appController = new Mock <IAppController>();

            appController.Setup(x => x.ExitApp()).Verifiable();
            var command = new ExitAppCommand(appController.Object);

            // Act
            command.Execute();

            // Assert
            appController.Verify(x => x.ExitApp(), Times.Once);
        }
예제 #4
0
 public ViewModelExit()
 {
     ExitAppCommand = new ExitAppCommand(this);
 }