Search in sources :

Example 6 with PackageState

use of com.synopsys.integration.detectable.detectables.xcode.model.PackageState in project synopsys-detect by blackducksoftware.

the class PackageResolvedTransformerTest method testHttpsWithGit.

@Test
void testHttpsWithGit() {
    ResolvedPackage swiftCollectionsPackage = new ResolvedPackage("swift-collections", "https://github.com/apple/swift-collections.git", new PackageState(null, "2d33a0ea89c961dcb2b3da2157963d9c0370347e", "1.0.1"));
    PackageResolved packageResolved = createPackageResolved(swiftCollectionsPackage);
    PackageResolvedTransformer transformer = new PackageResolvedTransformer(externalIdFactory);
    DependencyGraph dependencyGraph = transformer.transform(packageResolved);
    GraphAssert graphAssert = new GraphAssert(Forge.GITHUB, dependencyGraph);
    ExternalId swiftCollections = externalIdFactory.createNameVersionExternalId(Forge.GITHUB, "apple/swift-collections", "1.0.1");
    graphAssert.hasRootDependency(swiftCollections);
    graphAssert.hasRootSize(1);
}
Also used : PackageResolved(com.synopsys.integration.detectable.detectables.xcode.model.PackageResolved) PackageResolvedTransformer(com.synopsys.integration.detectable.detectables.xcode.process.PackageResolvedTransformer) GraphAssert(com.synopsys.integration.detectable.util.graph.GraphAssert) ExternalId(com.synopsys.integration.bdio.model.externalid.ExternalId) PackageState(com.synopsys.integration.detectable.detectables.xcode.model.PackageState) DependencyGraph(com.synopsys.integration.bdio.graph.DependencyGraph) ResolvedPackage(com.synopsys.integration.detectable.detectables.xcode.model.ResolvedPackage) Test(org.junit.jupiter.api.Test)

Aggregations

PackageState (com.synopsys.integration.detectable.detectables.xcode.model.PackageState)6 DependencyGraph (com.synopsys.integration.bdio.graph.DependencyGraph)5 ExternalId (com.synopsys.integration.bdio.model.externalid.ExternalId)5 PackageResolved (com.synopsys.integration.detectable.detectables.xcode.model.PackageResolved)5 ResolvedPackage (com.synopsys.integration.detectable.detectables.xcode.model.ResolvedPackage)5 PackageResolvedTransformer (com.synopsys.integration.detectable.detectables.xcode.process.PackageResolvedTransformer)5 GraphAssert (com.synopsys.integration.detectable.util.graph.GraphAssert)5 Test (org.junit.jupiter.api.Test)5 Dependency (com.synopsys.integration.bdio.model.dependency.Dependency)1 MalformedURLException (java.net.MalformedURLException)1