use of com.synopsys.integration.bdio.model.externalid.ExternalIdFactory in project hub-detect by blackducksoftware.
the class CodeLocationNameGeneratorTest method testLongCodeLocationNames.
@Test
public void testLongCodeLocationNames() {
final String expected = "hub-common-rest/hub...esthub-common-rest/group/name/version npm/bom";
final ExternalIdFactory factory = new ExternalIdFactory();
final ExternalId externalId = factory.createMavenExternalId("group", "name", "version");
final DetectFileFinder detectFileFinder = new DetectFileFinder();
final CodeLocationNameGenerator codeLocationNameGenerator = new CodeLocationNameGenerator(detectFileFinder);
final String sourcePath = "/Users/ekerwin/Documents/source/integration/hub-common-rest";
final String codeLocationPath = "/Users/ekerwin/Documents/source/integration/hub-common-rest/hub-common-resthub-common-resthub-common-resthub-common-resthub-common-resthub-common-resthub-common-resthub-common-resthub-common-resthub-common-resthub-common-resthub-common-resthub-common-resthub-common-resthub-common-resthub-common-resthub-common-resthub-common-resthub-common-resthub-common-rest";
final String prefix = "";
final String suffix = "";
final String actual = codeLocationNameGenerator.createBomCodeLocationName(sourcePath, codeLocationPath, externalId, DetectCodeLocationType.NPM, prefix, suffix);
assertEquals(expected, actual);
}
Aggregations