5

The following code:

@Mock
private Appender mockAppender;
@Captor
private ArgumentCaptor<LoggingEvent> captorLoggingEvent;
...
verify(mockAppender, atLeastOnce()).doAppend(captorLoggingEvent.capture());

run normally as JUnit test but fails using ecobertura with this message:

Wanted but not invoked:
appender.doAppend(<Capturing argument>);...Actually, there were zero interactions with this mock.

I'm using :

  • Eclipse STS
  • JRE(jdk1.6.0_41)
  • junit-4.11.jar
  • powermock-module-junit4-common-1.5.1.jar
  • powermock-module-junit4-1.5.1.jar
  • powermock-reflect-1.5.1.jar
  • mockito-core-1.9.5.jar

Can you help me to solve this problem?

sanyassh
  • 8,100
  • 13
  • 36
  • 70

0 Answers0