public void TestNotWrittenWhenServiceProxyIsNull() { var signaled = false; var service = new ServiceController() { SignalBegin = (controller, message) => { signaled = true; }, Settings = { ServiceUpdateCore = false }, Observer = { Status = ServiceStatusType.Started }, ServiceLoaderProxyType = typeof(MockServiceLoaderProxy) }; service.WriteConfig_Tick(null); Assert.IsFalse(signaled); service.Dispose(); }
public void TestWriteConfigTickPassedTroughToMessage() { var signaled = false; var service = new ServiceController() { ServiceLoaderProxy = new MockServiceLoaderProxy(), WriteServiceConfigBegin = (controller) => { signaled = true; }, Settings = { ServiceUpdateCore = false }, Observer = { Status = ServiceStatusType.Started }, ServiceLoaderProxyType = typeof(MockServiceLoaderProxy) }; service.WriteConfig_Tick(null); Assert.IsTrue(signaled); service.Dispose(); }