1 package org.apache.maven.surefire.its.jiras;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.maven.it.VerificationException;
23 import org.apache.maven.surefire.its.fixture.OutputValidator;
24 import org.apache.maven.surefire.its.fixture.SurefireJUnit4IntegrationTestCase;
25 import org.apache.maven.surefire.its.fixture.SurefireLauncher;
26 import org.junit.Test;
27
28 import static org.junit.Assert.fail;
29
30
31
32
33
34
35 public class Surefire649EmptyStringSystemPropertiesIT
36 extends SurefireJUnit4IntegrationTestCase
37 {
38
39 @Test
40 public void systemProperties()
41 throws VerificationException
42 {
43 SurefireLauncher launcher = unpack1();
44
45 OutputValidator validator = launcher.executeTest().verifyErrorFree( 1 );
46
47 for ( String line : validator.loadLogLines() )
48 {
49 if ( "emptyProperty=''".equals( line ) )
50 {
51 return;
52 }
53 }
54 fail("Could not find text in log: emptyProperty=''");
55 }
56
57 @Test
58 public void systemPropertyVariables()
59 throws VerificationException
60 {
61 SurefireLauncher launcher = unpack2();
62
63 OutputValidator validator = launcher.executeTest().verifyErrorFree( 1 );
64
65 for ( String line : validator.loadLogLines() )
66 {
67 if ( "emptyProperty=''".equals( line ) )
68 {
69 return;
70 }
71 }
72 fail("Could not find text in log: emptyProperty=''");
73 }
74
75 private SurefireLauncher unpack1()
76 {
77 return unpack( "surefire-649-systemProperties" );
78 }
79
80 private SurefireLauncher unpack2()
81 {
82 return unpack( "surefire-649-systemPropertyVariables" );
83 }
84 }