use of org.eclipse.sw360.cvesearch.datasource.CveSearchApiImpl in project sw360portal by sw360.
the class CveSearchDataTranslatorTest method testWithApacheData.
@Test
public void testWithApacheData() throws IOException {
List<CveSearchData> cveSearchDatas = new CveSearchApiImpl(host).search("apache", ".*");
List<CveSearchDataTranslator.VulnerabilityWithRelation> vms = cveSearchDatas.stream().map(cveSearchData -> cveSearchDataTranslator.apply(cveSearchData)).collect(Collectors.toList());
assert (vms != null);
List<Vulnerability> vs = vms.stream().map(vm -> vm.vulnerability).collect(Collectors.toList());
assert (vs.size() > 700);
}
use of org.eclipse.sw360.cvesearch.datasource.CveSearchApiImpl in project sw360portal by sw360.
the class CveSearchDataTranslatorTest method testWithRealData.
@Test
public void testWithRealData() throws IOException {
List<CveSearchData> cveSearchDatas = new CveSearchApiImpl(host).search("zyxel", "zywall");
List<CveSearchDataTranslator.VulnerabilityWithRelation> vms = cveSearchDatas.stream().map(cveSearchData -> cveSearchDataTranslator.apply(cveSearchData)).collect(Collectors.toList());
assert (vms != null);
}
Aggregations