1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.openehealth.ipf.commons.core.test;
18
19 import org.junit.Rule;
20 import org.junit.Test;
21
22 import static org.junit.Assert.fail;
23
24
25
26
27 public class ConditionalRuleTest {
28
29 private static final String currentArchitecture = System.getProperty("os.name");
30
31 @Rule public ConditionalRule rule = new ConditionalRule()
32 .ifSystemPropertyIs("os.name", currentArchitecture);
33
34 @Test
35 public void testRun() {
36 rule.verify();
37 }
38
39 @Test
40 public void testIgnore() {
41 rule.negate().verify();
42 fail("Should not be executed");
43 }
44
45 }