use of org.eclipse.dash.licenses.IContentId in project dash-licenses by eclipse.
the class PackageLockFileReaderTests method testV1Format.
@Test
void testV1Format() throws IOException {
try (InputStream input = this.getClass().getResourceAsStream(PACKAGE_LOCK_JSON)) {
PackageLockFileReader reader = new PackageLockFileReader(input);
String[] expected = { "npm/npmjs/-/loglevel/1.6.1", "npm/npmjs/-/sax/1.2.4", "npm/npmjs/-/saxes/3.1.9", "npm/npmjs/-/slimdom-sax-parser/1.1.3", "npm/npmjs/-/slimdom/2.2.1", "npm/npmjs/-/xml-js/1.6.11", "npm/npmjs/-/xmlchars/1.3.1", "npm/npmjs/@namespace/fontoxpath/3.3.0" };
String[] found = reader.getContentIds().stream().map(IContentId::toString).sorted().toArray(String[]::new);
assertArrayEquals(expected, found);
}
}
Aggregations