1 package org.apache.maven.surefire.group.match;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import junit.framework.TestCase;
22
23 public class OrGroupMatcherTest
24 extends TestCase
25 {
26
27 public void testMatchOneInOredGroup()
28 {
29 OrGroupMatcher matcher = new OrGroupMatcher( new SingleGroupMatcher( SingleGroupMatcher.class.getName() ),
30 new SingleGroupMatcher( InverseGroupMatcher.class.getName() ) );
31
32 assertTrue( matcher.enabled( InverseGroupMatcher.class, AndGroupMatcher.class ) );
33 }
34
35 public void testMatchBothInOredGroup()
36 {
37 OrGroupMatcher matcher = new OrGroupMatcher( new SingleGroupMatcher( SingleGroupMatcher.class.getName() ),
38 new SingleGroupMatcher( InverseGroupMatcher.class.getName() ) );
39
40 assertTrue( matcher.enabled( InverseGroupMatcher.class, SingleGroupMatcher.class ) );
41 }
42
43 public void testMatchNoneInOredGroup()
44 {
45 OrGroupMatcher matcher = new OrGroupMatcher( new SingleGroupMatcher( SingleGroupMatcher.class.getName() ),
46 new SingleGroupMatcher( InverseGroupMatcher.class.getName() ) );
47
48 assertFalse( matcher.enabled( OrGroupMatcher.class, AndGroupMatcher.class ) );
49 }
50
51 }