11#include <framework/logging/LogSystem.h>
12#include <gtest/gtest.h>
28 void SetUp()
override;
ELogLevel
Definition of the supported log levels.
@ c_Error
Error: for things that went wrong and have to be fixed.
Test fixture to be able to check the contents and types of emitted log messages in detail.
void expectMessageVariables(std::map< std::string, std::string > &&variables, bool strict=false)
check if the last message emitted contains the given variables and their values.
std::vector< LogMessage > m_messages
list of log messages
void clearMessages()
clear the list of save log messages
void expectMessageContent(LogConfig::ELogLevel level, const std::string &message)
check the content of the last log message against the given values
void SetUp() override
Add a log message interceptor.
void expectErrorWithVariables(std::map< std::string, std::string > &&variables, bool strict=false)
Expect an error with variables: This is a shorthand to check that there is exactly one error message ...
void expectMessage(LogConfig::ELogLevel level=LogConfig::c_Error, int count=1, bool strict=false)
check if there is a certain number of log messages of a given level
void TearDown() override
And try to reset logging system to default.
Some utilities to help with writing unit tests.