Search in sources :

Example 1 with DependencyGraphParser

use of org.sonatype.aether.test.util.DependencyGraphParser in project sonatype-aether by sonatype.

the class DefaultDependencyCollectorTest method setup.

@Before
public void setup() throws IOException {
    session = new TestRepositorySystemSession();
    collector = new DefaultDependencyCollector();
    collector.setArtifactDescriptorReader(new IniArtifactDescriptorReader("artifact-descriptions/"));
    collector.setVersionRangeResolver(new StubVersionRangeResolver());
    collector.setRemoteRepositoryManager(new StubRemoteRepositoryManager());
    parser = new DependencyGraphParser("artifact-descriptions/");
    repository = new RemoteRepository("id", "default", "file:///");
}
Also used : TestRepositorySystemSession(org.sonatype.aether.test.impl.TestRepositorySystemSession) DependencyGraphParser(org.sonatype.aether.test.util.DependencyGraphParser) RemoteRepository(org.sonatype.aether.repository.RemoteRepository) Before(org.junit.Before)

Example 2 with DependencyGraphParser

use of org.sonatype.aether.test.util.DependencyGraphParser in project sonatype-aether by sonatype.

the class JavaEffectiveScopeCalculatorTest method setup.

@Before
public void setup() {
    parser = new DependencyGraphParser("transformer/scope-calculator/");
    ctx = new SimpleDependencyGraphTransformationContext();
}
Also used : DependencyGraphParser(org.sonatype.aether.test.util.DependencyGraphParser) Before(org.junit.Before)

Example 3 with DependencyGraphParser

use of org.sonatype.aether.test.util.DependencyGraphParser in project sonatype-aether by sonatype.

the class ConflictIdSorterTest method setup.

@Before
public void setup() {
    sorter = new ConflictIdSorter();
    ctx = new SimpleDependencyGraphTransformationContext();
    parser = new DependencyGraphParser("transformer/conflict-id-sorter/");
}
Also used : DependencyGraphParser(org.sonatype.aether.test.util.DependencyGraphParser) Before(org.junit.Before)

Example 4 with DependencyGraphParser

use of org.sonatype.aether.test.util.DependencyGraphParser in project sonatype-aether by sonatype.

the class JavaDependencyContextRefinerTest method setUp.

@Before
public void setUp() {
    refiner = new JavaDependencyContextRefiner();
    parser = new DependencyGraphParser();
    context = new SimpleDependencyGraphTransformationContext();
}
Also used : DependencyGraphParser(org.sonatype.aether.test.util.DependencyGraphParser) Before(org.junit.Before)

Example 5 with DependencyGraphParser

use of org.sonatype.aether.test.util.DependencyGraphParser in project sonatype-aether by sonatype.

the class NearestVersionConflictResolverTest method testCyclicGraph.

@Test
public void testCyclicGraph() throws Exception {
    DependencyNode root = new DependencyGraphParser("transformer/version-resolver/").parse("cycle.txt");
    root = new SimpleConflictMarker().transformGraph(root, context);
    root = new NearestVersionConflictResolver().transformGraph(root, context);
    assertEquals(2, root.getChildren().size());
    assertEquals(1, root.getChildren().get(0).getChildren().size());
    assertEquals(0, root.getChildren().get(0).getChildren().get(0).getChildren().size());
    assertEquals(0, root.getChildren().get(1).getChildren().size());
}
Also used : DependencyGraphParser(org.sonatype.aether.test.util.DependencyGraphParser) DependencyNode(org.sonatype.aether.graph.DependencyNode) Test(org.junit.Test)

Aggregations

DependencyGraphParser (org.sonatype.aether.test.util.DependencyGraphParser)5 Before (org.junit.Before)4 Test (org.junit.Test)1 DependencyNode (org.sonatype.aether.graph.DependencyNode)1 RemoteRepository (org.sonatype.aether.repository.RemoteRepository)1 TestRepositorySystemSession (org.sonatype.aether.test.impl.TestRepositorySystemSession)1