internal void ItCanDeleteAService(bool autoStartArgument, ServiceStartType createdServiceStartType)
        {
            // Given
            GivenTheServiceControlManagerCanBeOpened();
            var service = GivenTheTestServiceExists();

            GivenTheServiceCanBeDeleted(service);

            // When
            sut.DeleteService(TestServiceName);

            // Then
            A.CallTo(() => service.Delete()).MustHaveHappened();
        }
示例#2
0
        public void ItShallThrowOnDeleteServiceWithEmptyServiceName()
        {
            Action invocation = () => sut.DeleteService(serviceName: string.Empty);

            invocation.ShouldThrow <ArgumentException>().Which.ParamName.Should().Be("serviceName");
        }