Skip to content

Commit 39f4ea2

Browse files
committed
Refactor test
1 parent 9f894c6 commit 39f4ea2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/java/org/apache/commons/lang3/SystemPropertiesTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
import org.junitpioneer.jupiter.SetSystemProperty;
3232
import org.junitpioneer.jupiter.SetSystemProperty.SetSystemProperties;
3333

34+
@SetSystemProperties({
35+
@SetSystemProperty(key = SystemPropertiesTest.KEY_SPACE_1, value = "value1"),
36+
@SetSystemProperty(key = SystemPropertiesTest.KEY_TAB_1, value = "value2") })
3437
class SystemPropertiesTest {
3538

3639
private static final String KEY_SPACE_1 = " ";
@@ -703,7 +706,6 @@ void testGetPathSeparator() {
703706
}
704707

705708
@Test
706-
@SetSystemProperties({ @SetSystemProperty(key = KEY_SPACE_1, value = "value1"), @SetSystemProperty(key = KEY_TAB_1, value = "value2") })
707709
void testGetProperty() {
708710
assertNull(SystemProperties.getProperty(null));
709711
assertNull(SystemProperties.getProperty(StringUtils.EMPTY));
@@ -712,7 +714,6 @@ void testGetProperty() {
712714
}
713715

714716
@Test
715-
@SetSystemProperties({ @SetSystemProperty(key = KEY_SPACE_1, value = "value1"), @SetSystemProperty(key = KEY_TAB_1, value = "value2") })
716717
void testGetPropertyStringString() {
717718
assertNull(SystemProperties.getProperty(null, (String) null));
718719
assertNull(SystemProperties.getProperty(StringUtils.EMPTY, (String) null));
@@ -725,7 +726,6 @@ void testGetPropertyStringString() {
725726
}
726727

727728
@Test
728-
@SetSystemProperties({ @SetSystemProperty(key = KEY_SPACE_1, value = "value1"), @SetSystemProperty(key = KEY_TAB_1, value = "value2") })
729729
void testGetPropertyStringSupplier() {
730730
assertNull(SystemProperties.getProperty(null, (Supplier<String>) null));
731731
assertNull(SystemProperties.getProperty(StringUtils.EMPTY, (Supplier<String>) null));

0 commit comments

Comments
 (0)