Class LogAsserts

    • Method Detail

      • assertLogMessagePresent

        public static void assertLogMessagePresent​(TestLogLevel logLevel,
                                                   String message)
        Asserts whether at least one LogRecord for the given parameter is present
        Parameters:
        logLevel - to be checked, must not be null
        message - to be checked, must not be null
      • assertNoLogMessagePresent

        public static void assertNoLogMessagePresent​(TestLogLevel logLevel,
                                                     String messagePart)
        Asserts whether no LogRecord for the given parameter is present
        Parameters:
        logLevel - to be checked, must not be null
        messagePart - to be checked, must not be null
      • assertNoLogMessagePresent

        public static void assertNoLogMessagePresent​(TestLogLevel logLevel,
                                                     Class<?> logger)
        Asserts whether no LogRecord for the given parameter is present
        Parameters:
        logLevel - to be checked, must not be null
        logger - to be checked, must not be null
      • assertSingleLogMessagePresent

        public static void assertSingleLogMessagePresent​(TestLogLevel logLevel,
                                                         String message)
        Asserts whether exactly one LogRecord for the given parameter is present
        Parameters:
        logLevel - to be checked, must not be null
        message - to be checked, must not be null
      • assertLogMessagePresent

        public static void assertLogMessagePresent​(TestLogLevel logLevel,
                                                   String message,
                                                   Throwable throwable)
        Asserts whether at least one LogRecord for the given parameter is present
        Parameters:
        logLevel - to be checked, must not be null
        message - to be checked, must not be null
        throwable - to be checked, must not be null
      • assertSingleLogMessagePresent

        public static void assertSingleLogMessagePresent​(TestLogLevel logLevel,
                                                         String message,
                                                         Throwable throwable)
        Asserts whether exactly one LogRecord for the given parameter is present
        Parameters:
        logLevel - to be checked, must not be null
        message - to be checked, must not be null
        throwable - to be checked, must not be null
      • assertLogMessagePresent

        public static void assertLogMessagePresent​(TestLogLevel logLevel,
                                                   String message,
                                                   Class<? extends Throwable> throwableClass)
        Asserts whether at least one LogRecord for the given parameter is present
        Parameters:
        logLevel - to be checked, must not be null
        message - to be checked, must not be null
        throwableClass - to be checked, must not be null
      • assertSingleLogMessagePresent

        public static void assertSingleLogMessagePresent​(TestLogLevel logLevel,
                                                         String message,
                                                         Class<? extends Throwable> throwableClass)
        Asserts whether exactly one LogRecord for the given parameter is present
        Parameters:
        logLevel - to be checked, must not be null
        message - to be checked, must not be null
        throwableClass - to be checked, must not be null
      • assertLogMessagePresentContaining

        public static void assertLogMessagePresentContaining​(TestLogLevel logLevel,
                                                             String messagePart)
        Asserts whether at least one LogRecord for the given parameter is present
        Parameters:
        logLevel - to be checked, must not be null
        messagePart - to be checked, must not be null
      • assertLogMessagePresentContaining

        public static void assertLogMessagePresentContaining​(TestLogLevel logLevel,
                                                             String messagePart,
                                                             Throwable throwable)
        Asserts whether at least one LogRecord for the given parameter is present
        Parameters:
        logLevel - to be checked, must not be null
        messagePart - to be checked, must not be null
        throwable - to be checked, must not be null
      • assertLogMessagePresentContaining

        public static void assertLogMessagePresentContaining​(TestLogLevel logLevel,
                                                             String messagePart,
                                                             Class<? extends Throwable> throwableClass)
        Asserts whether at least one LogRecord for the given parameter is present
        Parameters:
        logLevel - to be checked, must not be null
        messagePart - to be checked, must not be null
        throwableClass - to be checked, must not be null
      • assertSingleLogMessagePresentContaining

        public static void assertSingleLogMessagePresentContaining​(TestLogLevel logLevel,
                                                                   String messagePart,
                                                                   Throwable throwable)
        Asserts whether exactly one LogRecord for the given parameter is present
        Parameters:
        logLevel - to be checked, must not be null
        messagePart - to be checked, must not be null
        throwable - to be checked, must not be null
      • assertSingleLogMessagePresentContaining

        public static void assertSingleLogMessagePresentContaining​(TestLogLevel logLevel,
                                                                   String messagePart,
                                                                   Class<? extends Throwable> throwableClass)
        Asserts whether exactly one LogRecord for the given parameter is present
        Parameters:
        logLevel - to be checked, must not be null
        messagePart - to be checked, must not be null
        throwableClass - to be checked, must not be null