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 public class TestClassifierFilter
35 extends AbstractArtifactFeatureFilterTestCase
36 {
37
38 protected void setUp()
39 throws Exception
40 {
41 super.setUp();
42 filterClass = ClassifierFilter.class;
43 ArtifactStubFactory factory = new ArtifactStubFactory( null, false );
44 artifacts = factory.getClassifiedArtifacts();
45
46 }
47
48 public void testParsing()
49 throws Exception
50 {
51 parsing();
52
53 }
54
55 public void testFiltering()
56 throws Exception
57 {
58 Set<Artifact> result = filtering();
59 for ( Artifact artifact : result )
60 {
61 assertTrue( artifact.getClassifier().equals( "one" ) || artifact.getClassifier().equals( "two" ) );
62 }
63 }
64
65 public void testFiltering2()
66 throws Exception
67 {
68 Set<Artifact> result = filtering2();
69 for ( Artifact artifact : result )
70 {
71 assertTrue( artifact.getClassifier().equals( "two" ) || artifact.getClassifier().equals( "four" ) );
72 }
73 }
74
75 public void testFiltering3()
76 throws Exception
77 {
78 filtering3();
79 }
80 }