@SuppressWarnings("unchecked") @Test public void strategy_will_set_no_mock_config_result_for_type_web_scan_when_not_defined() { SecHubAdapterOptionsBuilderStrategy strategyToTest = new SecHubAdapterOptionsBuilderStrategy(context, ScanType.WEB_SCAN); scanProjectMockDataConfig.setWebScan(null); strategyToTest.configure(configBuilder); verify(configBuilder, never()).setOption(eq(AdapterOptionKey.MOCK_CONFIGURATION_RESULT), any()); }
@Override public <B extends AbstractAdapterConfigBuilder<B, C>, C extends AdapterConfig> void configure(B configBuilder) { String mockDataResultLowerCased = fetchMockConfigurationResultLowerCased(); if (mockDataResultLowerCased!=null) { configBuilder. setOption(AdapterOptionKey.MOCK_CONFIGURATION_RESULT, mockDataResultLowerCased) ; } }
SecHubAdapterOptionsBuilderStrategy implements AdapterConfigurationStrategy { @Override public <B extends AbstractAdapterConfigBuilder<B, C>, C extends AdapterConfig> void configure(B configBuilder) { String mockDataResultLowerCased = fetchMockConfigurationResultLowerCased(); if (mockDataResultLowerCased!=null) { configBuilder. setOption(AdapterOptionKey.MOCK_CONFIGURATION_RESULT, mockDataResultLowerCased) ; } } }
SecHubAdapterOptionsBuilderStrategy implements AdapterConfigurationStrategy { @Override public <B extends AbstractAdapterConfigBuilder<B, C>, C extends AdapterConfig> void configure(B configBuilder) { String mockDataResultLowerCased = fetchMockConfigurationResultLowerCased(); if (mockDataResultLowerCased!=null) { configBuilder. setOption(AdapterOptionKey.MOCK_CONFIGURATION_RESULT, mockDataResultLowerCased) ; } } SecHubAdapterOptionsBuilderStrategy(SecHubExecutionContext context, ScanType scanType); }
SecHubAdapterOptionsBuilderStrategy implements AdapterConfigurationStrategy { @Override public <B extends AbstractAdapterConfigBuilder<B, C>, C extends AdapterConfig> void configure(B configBuilder) { String mockDataResultLowerCased = fetchMockConfigurationResultLowerCased(); if (mockDataResultLowerCased!=null) { configBuilder. setOption(AdapterOptionKey.MOCK_CONFIGURATION_RESULT, mockDataResultLowerCased) ; } } SecHubAdapterOptionsBuilderStrategy(SecHubExecutionContext context, ScanType scanType); @Override void configure(B configBuilder); }
SecHubAdapterOptionsBuilderStrategy implements AdapterConfigurationStrategy { @Override public <B extends AbstractAdapterConfigBuilder<B, C>, C extends AdapterConfig> void configure(B configBuilder) { String mockDataResultLowerCased = fetchMockConfigurationResultLowerCased(); if (mockDataResultLowerCased!=null) { configBuilder. setOption(AdapterOptionKey.MOCK_CONFIGURATION_RESULT, mockDataResultLowerCased) ; } } SecHubAdapterOptionsBuilderStrategy(SecHubExecutionContext context, ScanType scanType); @Override void configure(B configBuilder);  }