public void ShutDown_WillNotifySingleInstanceGuard_Always() { var spySingleInstanceGuard = new Mock <ISingleAppInstanceGuard>(); var restarter = new Fake_AppRestarter(); restarter.Init(spySingleInstanceGuard.Object); restarter.ShutDown(); spySingleInstanceGuard.Verify(g => g.OnBeforeAppShutDown(), Times.Exactly(1)); }
public void ShutDown_WillCallAppShutdown_Always() { var stubSingleInstanceGuard = new Mock <ISingleAppInstanceGuard>(); var restarter = new Fake_AppRestarter(); restarter.Init(stubSingleInstanceGuard.Object); restarter.ShutDown(); Assert.IsTrue(restarter.CalledAppShutdown); }