public void TestStartedFromStarted() { var service = new ServiceController() { Packages = new MockServicePackageManager(), Settings = { ServiceUpdateCore = false }, ServiceLoaderProxyType = typeof(MockServiceLoaderProxy), Observer = { Status = ServiceStatusType.Started } }; service.Restart(); Assert.AreEqual(ServiceStatusType.Started, service.Observer.Status); service.Dispose(); }