Search in sources :

Example 1 with CveSearchWrapper

use of org.eclipse.sw360.cvesearch.datasource.CveSearchWrapper in project sw360portal by sw360.

the class CveSearchWrapperTest method compareToWithoutWrapper.

@Ignore("meanwhile cveSearchWrapper implementation changed, test maybe suitable for later use")
@Test
public void compareToWithoutWrapper() throws IOException {
    Release release = new ReleaseBuilder().setName(PRODUCTNAME).setVendorFullname(VENDORNAME).get();
    List<CveSearchData> resultDirect = cveSearchApi.search(VENDORNAME, PRODUCTNAME);
    Optional<List<CveSearchData>> resultWrapped = cveSearchWrapper.searchForRelease(release);
    assert (resultWrapped.isPresent());
    assert (resultWrapped.get() != null);
    assert (resultWrapped.get().size() > 0);
    assert (isEquivalent(resultDirect, resultWrapped.get()));
}
Also used : List(java.util.List) Release(org.eclipse.sw360.datahandler.thrift.components.Release) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

List (java.util.List)1 Release (org.eclipse.sw360.datahandler.thrift.components.Release)1 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1