1   /*
2    * Logback: the reliable, generic, fast and flexible logging framework.
3    * Copyright (C) 1999-2026, QOS.ch. All rights reserved.
4    *
5    * This program and the accompanying materials are dual-licensed under
6    * either the terms of the Eclipse Public License v2.0 as published by
7    * the Eclipse Foundation
8    *
9    *   or (per the licensee's choosing)
10   *
11   * under the terms of the GNU Lesser General Public License version 2.1
12   * as published by the Free Software Foundation.
13   */
14  
15  package ch.qos.logback.core.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 CoreBlackboxStatusChecker extends StatusUtil  {
23  
24      public CoreBlackboxStatusChecker(StatusManager sm) {
25          super(sm);
26      }
27  
28  
29      public CoreBlackboxStatusChecker(Context context) {
30          super(context);
31      }
32  
33      public void assertContainsMatch(int level, String regex) {
34          Assertions.assertTrue(containsMatch(level, regex));
35      }
36  
37      public void assertNoMatch(String regex) {
38          Assertions.assertFalse(containsMatch(regex));
39      }
40  
41      public void assertContainsMatch(String regex) {
42          Assertions.assertTrue(containsMatch(regex));
43      }
44  
45      public void assertContainsException(Class<?> scanExceptionClass) {
46          Assertions.assertTrue(containsException(scanExceptionClass));
47      }
48  
49      public void assertContainsException(Class<?> scanExceptionClass, String msg) {
50          Assertions.assertTrue(containsException(scanExceptionClass, msg));
51      }
52  
53      public void assertIsErrorFree() {
54          Assertions.assertTrue(isErrorFree(0));
55      }
56  
57      public void assertIsErrorFree(long treshhold) {
58          Assertions.assertTrue(isErrorFree(treshhold));
59      }
60  
61      public void assertIsWarningOrErrorFree() {
62          Assertions.assertTrue(isWarningOrErrorFree(0));
63      }
64  
65      public void assertErrorCount(int i) {
66      }
67  }