1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package ch.qos.logback.classic.blackbox.joran;
16
17 import ch.qos.logback.core.Context;
18 import ch.qos.logback.core.status.StatusManager;
19 import ch.qos.logback.core.status.StatusUtil;
20 import org.junit.jupiter.api.Assertions;
21
22 public class StatusChecker extends StatusUtil {
23
24 public StatusChecker(StatusManager sm) {
25 super(sm);
26 }
27
28 public StatusChecker(Context context) {
29 super(context);
30 }
31
32 public void assertContainsMatch(int level, String regex) {
33 Assertions.assertTrue(containsMatch(level, regex));
34 }
35
36 public void assertNoMatch(String regex) {
37 Assertions.assertFalse(containsMatch(regex));
38 }
39
40 public void assertContainsMatch(String regex) {
41 Assertions.assertTrue(containsMatch(regex));
42 }
43
44 public void assertContainsException(Class<?> scanExceptionClass) {
45 Assertions.assertTrue(containsException(scanExceptionClass));
46 }
47
48 public void assertContainsException(Class<?> scanExceptionClass, String msg) {
49 Assertions.assertTrue(containsException(scanExceptionClass, msg));
50 }
51
52 public void assertIsErrorFree() {
53 Assertions.assertTrue(isErrorFree(0));
54 }
55
56 public void assertIsErrorFree(long treshhold) {
57 Assertions.assertTrue(isErrorFree(treshhold));
58 }
59
60 public void assertIsWarningOrErrorFree() {
61 Assertions.assertTrue(isWarningOrErrorFree(0));
62 }
63
64 public void assertErrorCount(int i) {
65 }
66 }