public void ServerLifecycleManagerService_OnStop_Stops_Server() { var mockServerLifeManager = new Mock <IServerLifecycleManager>(); using (var serverLifecycleManagerServiceTest = new ServerLifecycleManagerServiceTest(mockServerLifeManager.Object)) { serverLifecycleManagerServiceTest.TestStop(); mockServerLifeManager.Verify(o => o.Stop(false, 0), Times.Once); } }
public void ServerLifecycleManagerService_Dispose_Disposes_IServerLifecycleManager() { var mockServerLifeManager = new Mock <IServerLifecycleManager>(); using (var serverLifecycleManagerServiceTest = new ServerLifecycleManagerServiceTest(mockServerLifeManager.Object)) { serverLifecycleManagerServiceTest.TestStop(); mockServerLifeManager.Verify(o => o.Stop(false, 0, false), Times.Once); } mockServerLifeManager.Verify(o => o.Dispose(), Times.Once); }