Closed ctlove0523 closed 4 years ago
I checked issue 326,but found not help me.
jmockit version:1.28
What confuse me is the mocked class is not a internal class, the below is my code:
public class CipherUtil { private static final HCCipherUtil CIPHER = new B(); public static String encrypt(String plaintText) { return CIPHER.encrypt(plaintText); } public static String decrypt(String cipherText) { return CIPHER.decrypt(cipherText); } }
I use the below code to mock:
new MockUp<CipherUtil>() { @Mock public String encrypt(String plaintText) { return plaintText; } @Mock public String decrypt(String cipherText) { return cipherText; } };
it's works well but i get warning message: Invalid mock-up for internal class CipherUtil class.
I checked issue 326,but found not help me.
jmockit version:1.28
What confuse me is the mocked class is not a internal class, the below is my code:
I use the below code to mock:
it's works well but i get warning message: Invalid mock-up for internal class CipherUtil class.