public void Shutdown() { bool wasShutdown = false; var kernel = new Mock<IKernel>(); { kernel.Setup(k => k.Shutdown()) .Callback(() => wasShutdown = true); } var systemDiagnostics = new SystemDiagnostics((p, s) => { }, null); var service = new CoreProxy(kernel.Object, systemDiagnostics); service.Start(); var task = service.Shutdown(); task.Wait(); Assert.IsTrue(wasShutdown); }
public void Shutdown() { bool wasShutdown = false; var kernel = new Mock <IKernel>(); { kernel.Setup(k => k.Shutdown()) .Callback(() => wasShutdown = true); } var systemDiagnostics = new SystemDiagnostics((p, s) => { }, null); var service = new CoreProxy(kernel.Object, systemDiagnostics); service.Start(); var task = service.Shutdown(); task.Wait(); Assert.IsTrue(wasShutdown); }