@Test public void testBomToPaths_firstElementsAreBomMembers() throws RepositoryException { List<Artifact> managedDependencies = Bom.readBom("com.google.cloud:google-cloud-bom:0.81.0-alpha") .getManagedDependencies(); ImmutableList<ClassPathEntry> classPath = classPathBuilder.resolve(managedDependencies, true).getClassPath(); ImmutableList<ClassPathEntry> entries = ImmutableList.copyOf(classPath); assertThat(entries.get(0).toString()) .isEqualTo("com.google.api:api-common:1.7.0"); int bomSize = managedDependencies.size(); String lastFileName = entries.get(bomSize - 1).toString(); assertThat(lastFileName).isEqualTo("com.google.api:gax-httpjson:0.57.0"); }
public ClassPathResult resolve(List<Artifact> artifacts, boolean full) { DependencyGraph result; if (full) { result = dependencyGraphBuilder.buildFullDependencyGraph(artifacts); } else { result = dependencyGraphBuilder.buildVerboseDependencyGraph(artifacts); } return mediate(result); }
ClassPathBuilder { public ClassPathResult resolve(List<Artifact> artifacts, boolean full) { DependencyGraph result; if (full) { result = dependencyGraphBuilder.buildFullDependencyGraph(artifacts); } else { result = dependencyGraphBuilder.buildVerboseDependencyGraph(artifacts); } return mediate(result); } }
ClassPathBuilder { public ClassPathResult resolve(List<Artifact> artifacts, boolean full) { DependencyGraph result; if (full) { result = dependencyGraphBuilder.buildFullDependencyGraph(artifacts); } else { result = dependencyGraphBuilder.buildVerboseDependencyGraph(artifacts); } return mediate(result); } ClassPathBuilder();  ClassPathBuilder(DependencyGraphBuilder dependencyGraphBuilder); }
ClassPathBuilder { public ClassPathResult resolve(List<Artifact> artifacts, boolean full) { DependencyGraph result; if (full) { result = dependencyGraphBuilder.buildFullDependencyGraph(artifacts); } else { result = dependencyGraphBuilder.buildVerboseDependencyGraph(artifacts); } return mediate(result); } ClassPathBuilder();  ClassPathBuilder(DependencyGraphBuilder dependencyGraphBuilder); ClassPathResult resolve(List<Artifact> artifacts, boolean full); }
ClassPathBuilder { public ClassPathResult resolve(List<Artifact> artifacts, boolean full) { DependencyGraph result; if (full) { result = dependencyGraphBuilder.buildFullDependencyGraph(artifacts); } else { result = dependencyGraphBuilder.buildVerboseDependencyGraph(artifacts); } return mediate(result); } ClassPathBuilder();  ClassPathBuilder(DependencyGraphBuilder dependencyGraphBuilder); ClassPathResult resolve(List<Artifact> artifacts, boolean full);  }