We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我要测试的类中有一个非静态变量,它调用了另一个类的方法,而被调用的这个类存在静态代码块。我考虑用mockup解决。同时我要测试的类需要调用一个接口,我使用了@Injectable注解这个接口实例,并用@tested标注这个被测类。那么如何将mockup实例也注入@tested的实例中呢
The text was updated successfully, but these errors were encountered:
不用考虑怎么去将 mockUp 实例注入到 @tested 实例中, 你只需要在 @tested 实例创建之前执行 new MockUp 即可, 比如写在静态代码块中 static{ new MockUp() }
Sorry, something went wrong.
No branches or pull requests
我要测试的类中有一个非静态变量,它调用了另一个类的方法,而被调用的这个类存在静态代码块。我考虑用mockup解决。同时我要测试的类需要调用一个接口,我使用了@Injectable注解这个接口实例,并用@tested标注这个被测类。那么如何将mockup实例也注入@tested的实例中呢
The text was updated successfully, but these errors were encountered: