use of com.synopsys.integration.blackduck.api.manual.temporary.component.ComplexLicenseRequest in project blackduck-common by blackducksoftware.
the class ProjectServiceTestIT method testSetLicenseForProjectVersion.
@Test
public void testSetLicenseForProjectVersion() throws IntegrationException {
String projectName = "InitialName";
deleteProjectIfExists(projectName);
ProjectRequest projectRequest = new ProjectRequest();
projectRequest.setName(projectName);
projectRequest.setProjectTier(2);
projectRequest.setDescription("Initial Description");
ProjectVersionRequest projectVersionRequest = new ProjectVersionRequest();
projectVersionRequest.setVersionName("InitialVersion");
projectVersionRequest.setPhase(ProjectVersionPhaseType.DEVELOPMENT);
projectVersionRequest.setDistribution(ProjectVersionDistributionType.OPENSOURCE);
ComplexLicenseRequest complexLicenseRequest = new ComplexLicenseRequest();
String licenseName = ".NETZ GPL 2.0 With Exception License";
complexLicenseRequest.setLicense(licenseService.getLicenseUrlByLicenseName(licenseName).get().string());
projectVersionRequest.setLicense(complexLicenseRequest);
projectRequest.setVersionRequest(projectVersionRequest);
ProjectVersionWrapper projectVersionWrapper = ProjectServiceTestIT.projectService.createProject(projectRequest);
ProjectVersionView projectVersion = projectVersionWrapper.getProjectVersionView();
Assertions.assertEquals(licenseName, projectVersion.getLicense().getLicenseDisplay());
}
use of com.synopsys.integration.blackduck.api.manual.temporary.component.ComplexLicenseRequest in project blackduck-common by blackducksoftware.
the class ProjectSyncModel method createComplexLicenseRequest.
public ComplexLicenseRequest createComplexLicenseRequest() {
ComplexLicenseRequest complexLicenseRequest = new ComplexLicenseRequest();
complexLicenseRequest.setLicense(versionLicenseUrl);
return complexLicenseRequest;
}
Aggregations