Skip to content

Commit f4077e4

Browse files
committed
Add n logs to example
1 parent 067e8f8 commit f4077e4

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

logcapture-example/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
dependencies {
3-
implementation "org.logcapture:logcapture-core:1.3.0"
4-
implementation "org.logcapture:logcapture-junit4:1.3.0"
3+
implementation "org.logcapture:logcapture-core:1.3.1"
4+
implementation "org.logcapture:logcapture-junit4:1.3.1"
55
implementation "junit:junit:4.13.2"
66
}

logcapture-example/src/test/java/org/logcapture/example/ExampleShould.java

+10
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,16 @@ public void verify_mdc_keys() {
8282
.withMessage("a message"));
8383
}
8484

85+
@Test
86+
public void verify_captured_n_logs() {
87+
log.info("a message");
88+
log.info("a message");
89+
log.info("what");
90+
91+
logCaptureRule.logged(aLog().info()
92+
.withMessage("a message"), 2);
93+
}
94+
8595
class ServiceThatLogs {
8696

8797
void methodThatLogsStuff() {

0 commit comments

Comments
 (0)