You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The DefaultMock Spies in LoggerMock are created with the default Answer RETURNS_DEFAULTS from Mockito.
To Reproduce
Create a Junit Test with slf4j2-mock binding to slf4j and a simplelogger.properties. Don't bind any mock to the logger, so that the Default Mock will be used.
Expected behavior
As the DefaultMocks are Spies of SimpleLogger, the default Answer should be CALLS_REAL_METHODS, so that the SimpleLogger is used with the existing simplelogger.properties.
Additional context
The project contains a lot of unit Tests, but only a few needs mocking of the loggers. All other tests should have a normal logging behaviour with logging to System.out or a file.
The text was updated successfully, but these errors were encountered:
The project contains a lot of unit Tests, but only a few needs mocking of the loggers. All other tests should have a normal logging behaviour with logging to System.out or a file.
Describe the bug
The DefaultMock Spies in LoggerMock are created with the default Answer RETURNS_DEFAULTS from Mockito.
To Reproduce
Create a Junit Test with slf4j2-mock binding to slf4j and a simplelogger.properties. Don't bind any mock to the logger, so that the Default Mock will be used.
Expected behavior
As the DefaultMocks are Spies of SimpleLogger, the default Answer should be CALLS_REAL_METHODS, so that the SimpleLogger is used with the existing simplelogger.properties.
Additional context
The project contains a lot of unit Tests, but only a few needs mocking of the loggers. All other tests should have a normal logging behaviour with logging to System.out or a file.
The text was updated successfully, but these errors were encountered: