Closed jotunacorn closed 6 years ago
We spent a lot of time on updating our tests to be able to upgrade from 1.21 to latest version and now because of this bug can't upgrade. Is this going to be fixed soon and if not is there a workaround? (note that I also tried versions prior to 1.38 and each of those was failing because of other bugs (some related to interactions with TestNG) and couldn't find a recent version that was passing all tests.
Support for mock test method parameters had to be dropped, as it was no longer viable. If https://github.com/cbeust/testng/issues/1164 ever gets solved, it will be added back.
Version of JMockit that was used:
Using JMockit 1.38 and TestNG 6.14.3
Description of the problem:
When passing an
@Capturing
parameter the test changes behaviour from when the@Capturing
is a member. The@Capturing
instance does not mock the implementation of the interface when passed as a parameter. Below is a minimal class that works when the interfaceA
is a member but not when it's a parameter.Test.java
Build.gradle