use of org.spdx.rdfparser.model.SpdxDocument in project sw360portal by sw360.
the class SPDXParserTest method testAddSPDXContentToCLI.
@Test
@UseDataProvider("dataProviderAdd")
public void testAddSPDXContentToCLI(String exampleFile, List<String> expectedLicenses, int numberOfCoyprights, String exampleCopyright) throws Exception {
AttachmentContent attachmentContent = new AttachmentContent().setFilename(exampleFile);
InputStream input = makeAttachmentContentStream(exampleFile);
SpdxDocument spdxDocument = SPDXDocumentFactory.createSpdxDocument(input, parser.getUriOfAttachment(attachmentContentStore.get(exampleFile)), FILETYPE_SPDX_INTERNAL);
LicenseInfoParsingResult result = SPDXParserTools.getLicenseInfoFromSpdx(attachmentContent, spdxDocument);
assertIsResultOfExample(result.getLicenseInfo(), exampleFile, expectedLicenses, numberOfCoyprights, exampleCopyright);
}
Aggregations