private void WhenATestServiceIsCreatedOrUpdated(string testServiceName, bool autoStart, bool startImmediately, ServiceFailureActions serviceFailureActions = null, bool failureActionsOnNonCrashFailures = false)
 {
     sut.CreateOrUpdateService(testServiceName, TestServiceDisplayName, TestServiceDescription, TestServiceBinaryPath, TestCredentials,
                               serviceFailureActions, failureActionsOnNonCrashFailures, autoStart,
                               startImmediately, TestServiceErrorSeverity);
 }
        public void ItShallThrowOnCreateOrUpdateServiceWithNullServiceName()
        {
            Action invocation = () => sut.CreateOrUpdateService(CreateTestServiceDefinitionBuilder().WithServiceName(null).BuildNonValidating());

            invocation.ShouldThrow <ArgumentException>().Which.ParamName.Should().Be("serviceDefinition");
        }
示例#3
0
 private void WhenATestServiceIsCreatedOrUpdated(ServiceDefinition serviceDefinition, bool startImmediately)
 {
     sut.CreateOrUpdateService(serviceDefinition, startImmediately);
 }
        public void ItShallThrowOnCreateOrUpdateServiceWithNullServiceName()
        {
            Action invocation = () => sut.CreateOrUpdateService(serviceName: null, displayName: TestDisplayName, description: TestDescription, binaryPath: TestBinaryPath, credentials: Win32ServiceCredentials.LocalService);

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