public void TestFromStoppedEndsAsStarted() { var service = new ServiceController() { Packages = new MockServicePackageManager(), Observer = { Status = ServiceStatusType.Stopped }, ServiceLoaderProxyType = typeof(MockServiceLoaderProxy) }; service.MergePackage("localhost", "id"); Assert.AreEqual(ServiceStatusType.Started, service.Observer.Status); service.Dispose(); }
public void TestInstallDispatchedEntryStatusIsStarted() { var merged = false; var service = new ServiceController() { Packages = new MockServicePackageManager() { PackageInstalled = (sender, uri, packageId) => { merged = true; } }, Observer = { Status = ServiceStatusType.Started }, ServiceLoaderProxyType = typeof(MockServiceLoaderProxy) }; service.MergePackage("localhost", "id"); Assert.IsTrue(merged); service.Dispose(); }