File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
src/test/java/org/logcapture/example Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
2
2
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 "
5
5
implementation " junit:junit:4.13.2"
6
6
}
Original file line number Diff line number Diff line change @@ -82,6 +82,16 @@ public void verify_mdc_keys() {
82
82
.withMessage ("a message" ));
83
83
}
84
84
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
+
85
95
class ServiceThatLogs {
86
96
87
97
void methodThatLogsStuff () {
You can’t perform that action at this time.
0 commit comments