use of org.eclipse.aether.internal.test.util.NodeBuilder in project maven-resolver by apache.
the class DependencyFilterUtilsTest method testClasspathFilterCompile.
@Test
public void testClasspathFilterCompile() {
NodeBuilder builder = new NodeBuilder().artifactId("aid");
DependencyFilter filter = DependencyFilterUtils.classpathFilter("compile");
assertTrue(filter.accept(builder.scope("compile").build(), PARENTS));
assertTrue(filter.accept(builder.scope("system").build(), PARENTS));
assertTrue(filter.accept(builder.scope("provided").build(), PARENTS));
assertFalse(filter.accept(builder.scope("runtime").build(), PARENTS));
assertFalse(filter.accept(builder.scope("test").build(), PARENTS));
}
use of org.eclipse.aether.internal.test.util.NodeBuilder in project maven-resolver by apache.
the class DependencyFilterUtilsTest method testClasspathFilterRuntimeCommaSystem.
@Test
public void testClasspathFilterRuntimeCommaSystem() {
NodeBuilder builder = new NodeBuilder().artifactId("aid");
DependencyFilter filter = DependencyFilterUtils.classpathFilter("runtime,system");
assertTrue(filter.accept(builder.scope("compile").build(), PARENTS));
assertTrue(filter.accept(builder.scope("system").build(), PARENTS));
assertFalse(filter.accept(builder.scope("provided").build(), PARENTS));
assertTrue(filter.accept(builder.scope("runtime").build(), PARENTS));
assertFalse(filter.accept(builder.scope("test").build(), PARENTS));
}
use of org.eclipse.aether.internal.test.util.NodeBuilder in project maven-resolver by apache.
the class DependencyFilterUtilsTest method testClasspathFilterNull.
@Test
public void testClasspathFilterNull() {
NodeBuilder builder = new NodeBuilder().artifactId("aid");
DependencyFilter filter = DependencyFilterUtils.classpathFilter((String[]) null);
assertFalse(filter.accept(builder.scope("compile").build(), PARENTS));
assertFalse(filter.accept(builder.scope("system").build(), PARENTS));
assertFalse(filter.accept(builder.scope("provided").build(), PARENTS));
assertFalse(filter.accept(builder.scope("runtime").build(), PARENTS));
assertFalse(filter.accept(builder.scope("test").build(), PARENTS));
}
use of org.eclipse.aether.internal.test.util.NodeBuilder in project maven-resolver by apache.
the class DependencyFilterUtilsTest method testClasspathFilterRuntime.
@Test
public void testClasspathFilterRuntime() {
NodeBuilder builder = new NodeBuilder().artifactId("aid");
DependencyFilter filter = DependencyFilterUtils.classpathFilter("runtime");
assertTrue(filter.accept(builder.scope("compile").build(), PARENTS));
assertFalse(filter.accept(builder.scope("system").build(), PARENTS));
assertFalse(filter.accept(builder.scope("provided").build(), PARENTS));
assertTrue(filter.accept(builder.scope("runtime").build(), PARENTS));
assertFalse(filter.accept(builder.scope("test").build(), PARENTS));
}
use of org.eclipse.aether.internal.test.util.NodeBuilder in project maven-resolver by apache.
the class DependencyFilterUtilsTest method testClasspathFilterTest.
@Test
public void testClasspathFilterTest() {
NodeBuilder builder = new NodeBuilder().artifactId("aid");
DependencyFilter filter = DependencyFilterUtils.classpathFilter("test");
assertTrue(filter.accept(builder.scope("compile").build(), PARENTS));
assertTrue(filter.accept(builder.scope("system").build(), PARENTS));
assertTrue(filter.accept(builder.scope("provided").build(), PARENTS));
assertTrue(filter.accept(builder.scope("runtime").build(), PARENTS));
assertTrue(filter.accept(builder.scope("test").build(), PARENTS));
}
Aggregations