We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 067e8f8 commit f4077e4Copy full SHA for f4077e4
logcapture-example/build.gradle
@@ -1,6 +1,6 @@
1
2
dependencies {
3
- implementation "org.logcapture:logcapture-core:1.3.0"
4
- implementation "org.logcapture:logcapture-junit4:1.3.0"
+ implementation "org.logcapture:logcapture-core:1.3.1"
+ implementation "org.logcapture:logcapture-junit4:1.3.1"
5
implementation "junit:junit:4.13.2"
6
}
logcapture-example/src/test/java/org/logcapture/example/ExampleShould.java
@@ -82,6 +82,16 @@ public void verify_mdc_keys() {
82
.withMessage("a message"));
83
84
85
+ @Test
86
+ public void verify_captured_n_logs() {
87
+ log.info("a message");
88
89
+ log.info("what");
90
+
91
+ logCaptureRule.logged(aLog().info()
92
+ .withMessage("a message"), 2);
93
+ }
94
95
class ServiceThatLogs {
96
97
void methodThatLogsStuff() {
0 commit comments