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