Skip to content
New issue

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

MockMethod 不生效,附MockWith日志 #10

Closed
100Continue opened this issue Dec 22, 2020 · 0 comments
Closed

MockMethod 不生效,附MockWith日志 #10

100Continue opened this issue Dec 22, 2020 · 0 comments

Comments

@100Continue
Copy link

100Continue commented Dec 22, 2020

`@MockWith(diagnose = MockDiagnose.ENABLE)
public class AlertManagerImplTest {

private AlertManager alertManager = new AlertManagerImpl();

@MockMethod
private String trim(String self) {
    System.out.println("into trim");
    return "trim_string";
}

@Test
public void testMock(){

    System.out.println("start test");
    alertManager.commonFunc();
    String a = "sdsds ";
    System.out.println("1122 ".trim());
    System.out.println(a.trim());

}

}`

[DIAGNOSE] Handling test class com/xxx/xxx/xx/xxxx/AlertManagerImplTest

start test
1122
sdsds

Process finished with exit code 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant