Skip to content

Commit 5e9cf97

Browse files
committed
Delete @Test annotation from non-JUnit class
1 parent 151f7a6 commit 5e9cf97

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed

log4j-core-test/src/test/java/org/apache/logging/log4j/core/lookup/MainInputArgumentsJmxLookupTest.java

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import static org.junit.jupiter.api.Assertions.assertNull;
2020

2121
import java.util.Map;
22-
import org.junit.jupiter.api.Test;
2322

2423
/**
2524
* Tests {@link JmxRuntimeInputArgumentsLookup} from the command line, not a JUnit test.
@@ -34,42 +33,13 @@ public static void main(final String[] args) {
3433
new MainInputArgumentsJmxLookupTest().callFromMain();
3534
}
3635

37-
@Test
38-
public void testMap() {
39-
final JmxRuntimeInputArgumentsLookup lookup = JmxRuntimeInputArgumentsLookup.JMX_SINGLETON;
40-
String result2 = null;
41-
if (null != null) {
42-
final Map<String, String> map2 = lookup.getMap();
43-
result2 = map2 == null ? null : map2.get(null);
44-
}
45-
assertNull(result2);
46-
String result1 = null;
47-
if ("X" != null) {
48-
final Map<String, String> map1 = lookup.getMap();
49-
result1 = map1 == null ? null : map1.get("X");
50-
}
51-
assertNull(result1);
52-
String result = null;
53-
if ("foo.txt" != null) {
54-
final Map<String, String> map = lookup.getMap();
55-
result = map == null ? null : map.get("foo.txt");
56-
}
57-
assertNull(result);
58-
}
59-
6036
public void callFromMain() {
6137
final JmxRuntimeInputArgumentsLookup lookup = JmxRuntimeInputArgumentsLookup.JMX_SINGLETON;
6238
String result1 = null;
63-
if (null != null) {
64-
final Map<String, String> map1 = lookup.getMap();
65-
result1 = map1 == null ? null : map1.get(null);
66-
}
6739
assertNull(result1);
6840
String result = null;
69-
if ("X" != null) {
70-
final Map<String, String> map = lookup.getMap();
71-
result = map == null ? null : map.get("X");
72-
}
41+
final Map<String, String> map = lookup.getMap();
42+
result = map == null ? null : map.get("X");
7343
assertNull(result);
7444
// Eclipse adds -Dfile.encoding=Cp1252
7545
// assertEquals("--file", lookup.lookup("0"));

0 commit comments

Comments
 (0)