You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by mi...@apache.org on 2016/04/18 13:38:29 UTC
[43/50] logging-log4j2 git commit: Add traceEntry/Exit() tests.
Add traceEntry/Exit() tests.
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/7380b27e
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/7380b27e
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/7380b27e
Branch: refs/heads/LOG4J2-1365
Commit: 7380b27e15465d943cdeecb6ec35430859406256
Parents: b61fbbd
Author: ggregory <gg...@apache.org>
Authored: Sun Apr 17 16:59:03 2016 -0700
Committer: ggregory <gg...@apache.org>
Committed: Sun Apr 17 16:59:03 2016 -0700
----------------------------------------------------------------------
.../java/org/apache/logging/log4j/core/LoggerTest.java | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/7380b27e/log4j-core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java
index 7ba6a89..7a2e01e 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/LoggerTest.java
@@ -89,8 +89,8 @@ public class LoggerTest {
@Test
public void basicFlow() {
- logger.entry();
- logger.exit();
+ logger.traceEntry();
+ logger.traceExit();
final List<LogEvent> events = app.getEvents();
assertEventCount(events, 2);
}
@@ -98,6 +98,14 @@ public class LoggerTest {
@Test
public void simpleFlow() {
logger.entry(CONFIG);
+ logger.traceExit(0);
+ final List<LogEvent> events = app.getEvents();
+ assertEventCount(events, 2);
+ }
+
+ @Test
+ public void simpleFlowDepreacted() {
+ logger.entry(CONFIG);
logger.exit(0);
final List<LogEvent> events = app.getEvents();
assertEventCount(events, 2);