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