public void ConnectionWorkflow_DownloadServiceParameters_RegexPropertyNotSet_SetsFilterWithDefaultExpression()
        {
            // Setup
            var controller                 = new ConfigurableProgressController();
            var progressEvents             = new ConfigurableProgressStepExecutionEvents();
            var expectedExpression         = ServerProperty.TestProjectRegexDefaultValue;
            ConnectionWorkflow testSubject = SetTestSubjectWithConnectedServer();

            // Sanity
            Assert.IsFalse(this.sonarQubeService.ServerProperties.Any(x => x.Key != ServerProperty.TestProjectRegexKey), "Test project regex property should not be set");

            // Act
            testSubject.DownloadServiceParameters(controller, CancellationToken.None, progressEvents);

            // Verify
            filter.AssertTestRegex(expectedExpression, RegexOptions.IgnoreCase);
            progressEvents.AssertProgressMessages(Strings.DownloadingServerSettingsProgessMessage);
        }
        public async Task ConnectionWorkflow_DownloadServiceParameters_RegexPropertyNotSet_SetsFilterWithDefaultExpression()
        {
            // Arrange
            this.sonarQubeServiceMock.Setup(x => x.GetAllPropertiesAsync(It.IsAny <CancellationToken>()))
            .ReturnsAsync(new List <SonarQubeProperty> {
                new SonarQubeProperty(SonarQubeProperty.TestProjectRegexKey,
                                      SonarQubeProperty.TestProjectRegexDefaultValue)
            });
            var controller                 = new ConfigurableProgressController();
            var progressEvents             = new ConfigurableProgressStepExecutionEvents();
            var expectedExpression         = SonarQubeProperty.TestProjectRegexDefaultValue;
            ConnectionWorkflow testSubject = SetTestSubjectWithConnectedServer();

            // Act
            await testSubject.DownloadServiceParametersAsync(controller, progressEvents, CancellationToken.None);

            // Assert
            filter.AssertTestRegex(expectedExpression, RegexOptions.IgnoreCase);
            progressEvents.AssertProgressMessages(Strings.DownloadingServerSettingsProgessMessage);
        }