1 package org.apache.maven.shared.artifact.filter.collection;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 import java.util.Set;
27
28 import org.apache.maven.artifact.Artifact;
29 import org.apache.maven.plugin.testing.ArtifactStubFactory;
30
31
32
33
34
35 public class TestArtifactFilter
36 extends AbstractArtifactFeatureFilterTestCase
37 {
38
39 protected void setUp()
40 throws Exception
41 {
42 super.setUp();
43 filterClass = ArtifactIdFilter.class;
44 ArtifactStubFactory factory = new ArtifactStubFactory( null, false );
45 artifacts = factory.getArtifactArtifacts();
46 }
47
48 public void testParsing()
49 throws Exception
50 {
51 parsing();
52 }
53
54 public void testFiltering()
55 throws Exception
56 {
57 Set<Artifact> result = filtering();
58 for ( Artifact artifact : result )
59 {
60 assertTrue( artifact.getArtifactId().equals( "two" ) );
61 }
62 }
63
64 public void testFiltering2()
65 throws Exception
66 {
67 Set<Artifact> result = filtering2();
68 for ( Artifact artifact : result )
69 {
70 assertTrue( artifact.getArtifactId().equals( "two" ) || artifact.getArtifactId().equals( "four" ) );
71 }
72 }
73
74 public void testFiltering3()
75 throws Exception
76 {
77 filtering3();
78 }
79 }