@Test(dataProvider = "secData") public void testCheckMessage(String msg, boolean result) { assertThat(this.wxService.getSecCheckService() .checkMessage(msg)) .isEqualTo(result); }
@Override public boolean checkMessage(String msgString) { JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("content", msgString); try { this.service.post(MSG_SEC_CHECK_URL, jsonObject.toString()); } catch (WxErrorException e) { return false; } return true; }
WxMaSecCheckServiceImpl implements WxMaSecCheckService { @Override public boolean checkMessage(String msgString) { JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("content", msgString); try { this.service.post(MSG_SEC_CHECK_URL, jsonObject.toString()); } catch (WxErrorException e) { return false; } return true; } }
WxMaSecCheckServiceImpl implements WxMaSecCheckService { @Override public boolean checkMessage(String msgString) { JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("content", msgString); try { this.service.post(MSG_SEC_CHECK_URL, jsonObject.toString()); } catch (WxErrorException e) { return false; } return true; } WxMaSecCheckServiceImpl(WxMaService service); }
WxMaSecCheckServiceImpl implements WxMaSecCheckService { @Override public boolean checkMessage(String msgString) { JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("content", msgString); try { this.service.post(MSG_SEC_CHECK_URL, jsonObject.toString()); } catch (WxErrorException e) { return false; } return true; } WxMaSecCheckServiceImpl(WxMaService service); @Override boolean checkImage(File file); @Override boolean checkMessage(String msgString); }
WxMaSecCheckServiceImpl implements WxMaSecCheckService { @Override public boolean checkMessage(String msgString) { JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("content", msgString); try { this.service.post(MSG_SEC_CHECK_URL, jsonObject.toString()); } catch (WxErrorException e) { return false; } return true; } WxMaSecCheckServiceImpl(WxMaService service); @Override boolean checkImage(File file); @Override boolean checkMessage(String msgString);  }