@Test public void testGet() throws Exception { final Integer agentId = this.wxCpService.getWxCpConfigStorage().getAgentId(); WxCpAgent wxCpAgent = this.wxCpService.getAgentService().get(agentId); assertThat(wxCpAgent.getAgentId()).isEqualTo(agentId); assertThat(wxCpAgent.getAllowUserInfos().getUsers().toArray()).isNotEmpty(); assertThat(wxCpAgent.getAllowParties().getPartyIds().toArray()).isNotEmpty(); assertThat(wxCpAgent.getAllowTags().getTagIds().toArray()).isNotEmpty(); }
@Override public WxCpAgent get(Integer agentId) throws WxErrorException { if (agentId == null) { throw new IllegalArgumentException("缺少agentid参数"); } String url = "https: String responseContent = this.mainService.get(url, null); return WxCpAgent.fromJson(responseContent); }
WxCpAgentServiceImpl implements WxCpAgentService { @Override public WxCpAgent get(Integer agentId) throws WxErrorException { if (agentId == null) { throw new IllegalArgumentException("缺少agentid参数"); } String url = "https: String responseContent = this.mainService.get(url, null); return WxCpAgent.fromJson(responseContent); } }
WxCpAgentServiceImpl implements WxCpAgentService { @Override public WxCpAgent get(Integer agentId) throws WxErrorException { if (agentId == null) { throw new IllegalArgumentException("缺少agentid参数"); } String url = "https: String responseContent = this.mainService.get(url, null); return WxCpAgent.fromJson(responseContent); } WxCpAgentServiceImpl(WxCpService mainService); }
WxCpAgentServiceImpl implements WxCpAgentService { @Override public WxCpAgent get(Integer agentId) throws WxErrorException { if (agentId == null) { throw new IllegalArgumentException("缺少agentid参数"); } String url = "https: String responseContent = this.mainService.get(url, null); return WxCpAgent.fromJson(responseContent); } WxCpAgentServiceImpl(WxCpService mainService); @Override WxCpAgent get(Integer agentId); @Override void set(WxCpAgent agentInfo); @Override List<WxCpAgent> list(); }
WxCpAgentServiceImpl implements WxCpAgentService { @Override public WxCpAgent get(Integer agentId) throws WxErrorException { if (agentId == null) { throw new IllegalArgumentException("缺少agentid参数"); } String url = "https: String responseContent = this.mainService.get(url, null); return WxCpAgent.fromJson(responseContent); } WxCpAgentServiceImpl(WxCpService mainService); @Override WxCpAgent get(Integer agentId); @Override void set(WxCpAgent agentInfo); @Override List<WxCpAgent> list();  }