use of com.hp.octane.integrations.services.rest.SSCRestClient in project octane-ci-java-sdk by MicroFocus.
the class VulnerabilitiesTests method wellFormedURLS.
@Test
public void wellFormedURLS() {
SSCProjectConfiguration sscFortifyConfigurations = dtoFactory.newDTO(SSCProjectConfiguration.class).setSSCUrl("server_url").setProjectName("project").setProjectVersion("version").setSSCBaseAuthToken("");
SSCRestClient sscClientMock = createNiceMock(SSCRestClient.class);
replay();
SSCProjectConnector sscProjectConnector = new SSCProjectConnector(sscFortifyConfigurations, sscClientMock);
String projectIdURL = sscProjectConnector.getProjectIdURL();
String newIssuesURL = sscProjectConnector.getIssuesURL(1);
String artifactsURL = sscProjectConnector.getArtifactsURL(100, 1000);
String urlForProjectVersion = sscProjectConnector.getURLForProjectVersion(500);
Assert.assertEquals(projectIdURL, "projects?q=name:project");
Assert.assertEquals(newIssuesURL, "projectVersions/1/issues?showhidden=false&showremoved=false&showsuppressed=false");
Assert.assertEquals(artifactsURL, "projectVersions/100/artifacts?limit=1000");
Assert.assertEquals(urlForProjectVersion, "projects/500/versions?q=name:version");
}
Aggregations