"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "log4j-api/src/test/java/org/apache/logging/log4j/message/ReusableParameterizedMessageTest.java" between
apache-log4j-2.11.1-src.tar.gz and apache-log4j-2.11.2-src.tar.gz

About: Apache Log4j 2 is a logging library for Java. Source distribution (Java).

ReusableParameterizedMessageTest.java  (apache-log4j-2.11.1-src):ReusableParameterizedMessageTest.java  (apache-log4j-2.11.2-src)
skipping to change at line 156 skipping to change at line 156
msg.set(testMsg, "msgs", EXCEPTION2); msg.set(testMsg, "msgs", EXCEPTION2);
assertSame(EXCEPTION2, msg.getThrowable()); assertSame(EXCEPTION2, msg.getThrowable());
} }
@Test @Test
public void testParameterConsumer() { public void testParameterConsumer() {
final String testMsg = "Test message {}"; final String testMsg = "Test message {}";
final ReusableParameterizedMessage msg = new ReusableParameterizedMessag e(); final ReusableParameterizedMessage msg = new ReusableParameterizedMessag e();
final Throwable EXCEPTION1 = new IllegalAccessError("#1"); final Throwable EXCEPTION1 = new IllegalAccessError("#1");
msg.set(testMsg, "msg", EXCEPTION1); msg.set(testMsg, "msg", EXCEPTION1);
List<Object> expected = new LinkedList<>(); final List<Object> expected = new LinkedList<>();
expected.add("msg"); expected.add("msg");
expected.add(EXCEPTION1); expected.add(EXCEPTION1);
final List<Object> actual = new LinkedList<>(); final List<Object> actual = new LinkedList<>();
msg.forEachParameter(new ParameterConsumer<Void>() { msg.forEachParameter(new ParameterConsumer<Void>() {
@Override @Override
public void accept(Object parameter, int parameterIndex, Void state) { public void accept(final Object parameter, final int parameterIndex, final Void state) {
actual.add(parameter); actual.add(parameter);
} }
}, null); }, null);
assertEquals(expected, actual); assertEquals(expected, actual);
} }
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)