Search in sources :

Example 6 with PackageState

use of com.synopsys.integration.detectable.detectables.swift.lock.data.PackageState in project synopsys-detect by blackducksoftware.

the class PackageResolvedTransformerTest method malformedUrlTest.

@Test
void malformedUrlTest() {
    ResolvedPackage malformedUrlPackage = new ResolvedPackage("MalformedUrlPackage", "data that isn't a url", new PackageState(null, "revision", "version"));
    PackageResolvedTransformer transformer = new PackageResolvedTransformer();
    PackageResolved packageResolved = createPackageResolved(malformedUrlPackage);
    DependencyGraph dependencyGraph = transformer.transform(packageResolved);
    GraphAssert graphAssert = new GraphAssert(Forge.GITHUB, dependencyGraph);
    graphAssert.hasRootSize(0);
}
Also used : PackageResolved(com.synopsys.integration.detectable.detectables.swift.lock.data.PackageResolved) GraphAssert(com.synopsys.integration.detectable.util.graph.GraphAssert) PackageState(com.synopsys.integration.detectable.detectables.swift.lock.data.PackageState) DependencyGraph(com.synopsys.integration.bdio.graph.DependencyGraph) ResolvedPackage(com.synopsys.integration.detectable.detectables.swift.lock.data.ResolvedPackage) Test(org.junit.jupiter.api.Test)

Aggregations

PackageState (com.synopsys.integration.detectable.detectables.swift.lock.data.PackageState)6 DependencyGraph (com.synopsys.integration.bdio.graph.DependencyGraph)5 PackageResolved (com.synopsys.integration.detectable.detectables.swift.lock.data.PackageResolved)5 ResolvedPackage (com.synopsys.integration.detectable.detectables.swift.lock.data.ResolvedPackage)5 GraphAssert (com.synopsys.integration.detectable.util.graph.GraphAssert)5 Test (org.junit.jupiter.api.Test)5 ExternalId (com.synopsys.integration.bdio.model.externalid.ExternalId)4 MalformedURLException (java.net.MalformedURLException)1