@Test public void teamId_not_found_name_by_provider_returns_default_teamId() { NamePatternIdprovider provider = mock(NamePatternIdprovider.class); when(provider.getIdForName("abc")).thenReturn(null); when(scanConfigService.getNamePatternIdProvider(MappingIdentifier.CHECKMARX_NEWPROJECT_TEAM_ID)).thenReturn(provider); String result = setupImplToTest.getTeamIdForNewProjects("abc"); assertEquals("A0",result); }
public String getTeamIdForNewProjects(String projectId) { String teamId = scanConfigService.getNamePatternIdProvider(MappingIdentifier.CHECKMARX_NEWPROJECT_TEAM_ID).getIdForName(projectId); if (teamId!=null) { return teamId; } return teamIdForNewProjects; }
CheckmarxInstallSetupImpl extends AbstractInstallSetup implements CheckmarxInstallSetup { public String getTeamIdForNewProjects(String projectId) { String teamId = scanConfigService.getNamePatternIdProvider(MappingIdentifier.CHECKMARX_NEWPROJECT_TEAM_ID).getIdForName(projectId); if (teamId!=null) { return teamId; } return teamIdForNewProjects; } }
CheckmarxInstallSetupImpl extends AbstractInstallSetup implements CheckmarxInstallSetup { public String getTeamIdForNewProjects(String projectId) { String teamId = scanConfigService.getNamePatternIdProvider(MappingIdentifier.CHECKMARX_NEWPROJECT_TEAM_ID).getIdForName(projectId); if (teamId!=null) { return teamId; } return teamIdForNewProjects; }  }
CheckmarxInstallSetupImpl extends AbstractInstallSetup implements CheckmarxInstallSetup { public String getTeamIdForNewProjects(String projectId) { String teamId = scanConfigService.getNamePatternIdProvider(MappingIdentifier.CHECKMARX_NEWPROJECT_TEAM_ID).getIdForName(projectId); if (teamId!=null) { return teamId; } return teamIdForNewProjects; }  @Override String getBaseURL(); String getClientSecret(); @Override String getUserId(); @Override String getPassword(); String getTeamIdForNewProjects(String projectId); @Override Long getPresetIdForNewProjects(String projectId); @Override boolean isHavingUntrustedCertificate(); @Override final boolean isAbleToScan(TargetType type); @Override String getEngineConfigurationName(); }
CheckmarxInstallSetupImpl extends AbstractInstallSetup implements CheckmarxInstallSetup { public String getTeamIdForNewProjects(String projectId) { String teamId = scanConfigService.getNamePatternIdProvider(MappingIdentifier.CHECKMARX_NEWPROJECT_TEAM_ID).getIdForName(projectId); if (teamId!=null) { return teamId; } return teamIdForNewProjects; }  @Override String getBaseURL(); String getClientSecret(); @Override String getUserId(); @Override String getPassword(); String getTeamIdForNewProjects(String projectId); @Override Long getPresetIdForNewProjects(String projectId); @Override boolean isHavingUntrustedCertificate(); @Override final boolean isAbleToScan(TargetType type); @Override String getEngineConfigurationName(); @Value("${sechub.adapter.checkmarx.clientsecret:"+CheckmarxConfig.DEFAULT_CLIENT_SECRET+"}")
    @MustBeDocumented(value = "So called 'client secret' of checkmarx. At leat at the moment this ist just a fixed default value, available in documentation at https://checkmarx.atlassian.net/wiki/spaces/KC/pages/1187774721/Using+the+CxSAST+REST+API+v8.6.0+and+up", secret = false)
    private String clientSecret; }