🎨 修复测试代码

This commit is contained in:
Binary Wang
2021-10-31 23:51:51 +08:00
parent 7b4ba553ac
commit e343159e3a
7 changed files with 10 additions and 8 deletions

View File

@ -237,7 +237,7 @@ public class BaseWxMpServiceImplTest {
RequestExecutor<Object, Object> re = mock(RequestExecutor.class);
AtomicInteger counter = new AtomicInteger();
Mockito.when(re.execute(Mockito.anyString(), Mockito.any(), Mockito.any())).thenAnswer((InvocationOnMock invocation) -> {
Mockito.when(re.execute(Mockito.anyString(), Mockito.any(), Mockito.any())).thenAnswer(invocation -> {
counter.incrementAndGet();
WxError error = WxError.builder().errorCode(WxMpErrorMsgEnum.CODE_40001.getCode()).errorMsg(WxMpErrorMsgEnum.CODE_40001.getMsg()).build();
throw new WxErrorException(error);