@SuppressWarnings("unchecked") @Test public void strategy_will_set_dediccated_mock_config_result_for_scantype_codescan() { SecHubAdapterOptionsBuilderStrategy strategyToTest = new SecHubAdapterOptionsBuilderStrategy(context, ScanType.CODE_SCAN); strategyToTest.configure(configBuilder); verify(configBuilder).setOption(AdapterOptionKey.MOCK_CONFIGURATION_RESULT, "red"); }
@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);  }