1
0
mirror of synced 2026-02-15 00:58:07 +08:00

🎨 修复单元测试代码引用错误

This commit is contained in:
Binary Wang
2026-01-15 17:26:43 +08:00
parent 0dfedb160a
commit 73704ca280

View File

@@ -13,8 +13,8 @@ import org.testng.annotations.Test;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Tp.GET_CUSTOMIZED_APP_DETAIL; import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Tp.GET_CUSTOMIZED_APP_DETAIL;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Tp.GET_TEMPLATE_LIST; import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Tp.GET_TEMPLATE_LIST;
import static org.mockito.ArgumentMatchers.any; import static org.mockito.Matchers.any;
import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertNotNull;
@@ -39,7 +39,7 @@ public class WxCpTpCustomizedServiceImplTest {
*/ */
@BeforeClass @BeforeClass
public void setUp() { public void setUp() {
MockitoAnnotations.openMocks(this); MockitoAnnotations.initMocks(this);
configStorage = new WxCpTpDefaultConfigImpl(); configStorage = new WxCpTpDefaultConfigImpl();
when(wxCpTpService.getWxCpTpConfigStorage()).thenReturn(configStorage); when(wxCpTpService.getWxCpTpConfigStorage()).thenReturn(configStorage);
wxCpTpCustomizedService = new WxCpTpCustomizedServiceImpl(wxCpTpService); wxCpTpCustomizedService = new WxCpTpCustomizedServiceImpl(wxCpTpService);