Search in sources :

Example 1 with ExternalIdFactory

use of com.blackducksoftware.integration.hub.bdio.model.externalid.ExternalIdFactory in project hub-detect by blackducksoftware.

the class DependencyGraphAssertions method assertHasMavenGav.

public static void assertHasMavenGav(final DependencyGraph dependencyGraph, final String org, final String name, final String version) {
    final ExternalIdFactory externalIdFactory = new ExternalIdFactory();
    final ExternalId id = externalIdFactory.createMavenExternalId(org, name, version);
    final Dependency dep = dependencyGraph.getDependency(id);
    assertNotNull("Expected dependency '" + org + ":" + name + ":" + version + "' to exist in graph but it was null.", dep);
}
Also used : ExternalIdFactory(com.blackducksoftware.integration.hub.bdio.model.externalid.ExternalIdFactory) ExternalId(com.blackducksoftware.integration.hub.bdio.model.externalid.ExternalId) Dependency(com.blackducksoftware.integration.hub.bdio.model.dependency.Dependency)

Example 2 with ExternalIdFactory

use of com.blackducksoftware.integration.hub.bdio.model.externalid.ExternalIdFactory in project hub-detect by blackducksoftware.

the class DependencyGraphAssertions method mavenGavToExternalId.

private static ExternalId mavenGavToExternalId(final String gav) {
    final String[] split = gav.split(":");
    final ExternalIdFactory externalIdFactory = new ExternalIdFactory();
    return externalIdFactory.createMavenExternalId(split[0], split[1], split[2]);
}
Also used : ExternalIdFactory(com.blackducksoftware.integration.hub.bdio.model.externalid.ExternalIdFactory)

Aggregations

ExternalIdFactory (com.blackducksoftware.integration.hub.bdio.model.externalid.ExternalIdFactory)2 Dependency (com.blackducksoftware.integration.hub.bdio.model.dependency.Dependency)1 ExternalId (com.blackducksoftware.integration.hub.bdio.model.externalid.ExternalId)1