public void Shutdown()
        {
            bool wasTriggered = false;

            var service = new Mock <IUserInterfaceService>();
            {
                service.Setup(s => s.Contains(It.IsAny <CommandId>()))
                .Returns(true);
                service.Setup(s => s.Invoke(It.IsAny <CommandId>(), It.IsAny <ICommandContext>()))
                .Callback <CommandId, ICommandContext>(
                    (id, context) =>
                {
                    Assert.AreEqual(ShutdownApplicationCommand.CommandId, id);

                    wasTriggered = true;
                });
            }

            var notificationNames = new Mock <INotificationNameConstants>();
            {
                notificationNames.Setup(n => n.SystemShuttingDown)
                .Returns(new NotificationName("a"));
            }

            var systemDiagnostics = new SystemDiagnostics((p, s) => { }, null);
            var facade            = new ApplicationFacade(service.Object, notificationNames.Object, systemDiagnostics);

            facade.Shutdown();
            Assert.IsTrue(wasTriggered);
        }
        public void Shutdown()
        {
            bool wasTriggered = false;

            var service = new Mock<IUserInterfaceService>();
            {
                service.Setup(s => s.Contains(It.IsAny<CommandId>()))
                    .Returns(true);
                service.Setup(s => s.Invoke(It.IsAny<CommandId>(), It.IsAny<ICommandContext>()))
                    .Callback<CommandId, ICommandContext>(
                        (id, context) =>
                            {
                                Assert.AreEqual(ShutdownApplicationCommand.CommandId, id);

                                wasTriggered = true;
                            });
            }

            var notificationNames = new Mock<INotificationNameConstants>();
            {
                notificationNames.Setup(n => n.SystemShuttingDown)
                    .Returns(new NotificationName("a"));
            }

            var systemDiagnostics = new SystemDiagnostics((p, s) => { }, null);
            var facade = new ApplicationFacade(service.Object, notificationNames.Object, systemDiagnostics);
            facade.Shutdown();
            Assert.IsTrue(wasTriggered);
        }