lihuachuan

Results 1 issues of lihuachuan

我git了源码,jdk改为1.8 把CookerServiceMock改为public,然后运行了java-demo中的SellerServiceTest,正常测试通过 但是当我把CookerServiceMock移到com.alibaba.demo.mock包下, 在SellerServiceTest中加了@MockWith(CookerServiceMock.class), 然后神奇的事情发生了,should_sell_sandwich测试失败 ``` org.opentest4j.AssertionFailedError: Expected :Fake-Sandwich-Cooker & Faked-Sandwich Actual :Real-Sandwich-Cooker & Real-Sandwich ``` 我查看了日志,hireSandwichCooker和cookSandwich没有used的记录 后来我测试了一下,当我在代码中加入 ``` @MockInvoke(targetClass = CookerService.class) private String prepareSandwich() { return "prepareSandwich"; } ```...