#Mockito Log

5 messages · Page 1 of 1 (latest)

main star
#

How can I create a Mock Log with Mockito and check if Object returns any log message? I'm getting this error:

Wanted but not invoked:
logger.log(
    <any java.util.logging.Level>,
    <Capturing argument>
);
velvet ginkgoBOT
#

This post has been reserved for your question.

Hey @main star! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

main star
#

hello?

crystal thicket
#

That's not an error - according to your test the mock could not find the mocked logging line. How are you implementing this? usually logging is static and its uncommon its mocked