@Test public void testUpdate(){ Groups.defaultGroups().move(TestConfiguration.getInstance().testUser(), 0); int group = Groups.defaultGroups().getUserGroup(TestConfiguration.getInstance().testUser()); Assert.assertTrue(group == 0); Groups.defaultGroups().move(TestConfiguration.getInstance().testUser(), 2); group = Groups.defaultGroups().getUserGroup(TestConfiguration.getInstance().testUser()); Assert.assertTrue(group == 2); Groups.defaultGroups().move(TestConfiguration.getInstance().testUser(), 0); }
public void update(int id, String name) { String url = WxEndpoint.get("url.group.update"); String json = String.format("{\"group\":{\"id\":%s,\"name\":\"%s\"}}", id, name); logger.debug("update group: {}", json); wxClient.post(url, json); }
Groups { public void update(int id, String name) { String url = WxEndpoint.get("url.group.update"); String json = String.format("{\"group\":{\"id\":%s,\"name\":\"%s\"}}", id, name); logger.debug("update group: {}", json); wxClient.post(url, json); } }
Groups { public void update(int id, String name) { String url = WxEndpoint.get("url.group.update"); String json = String.format("{\"group\":{\"id\":%s,\"name\":\"%s\"}}", id, name); logger.debug("update group: {}", json); wxClient.post(url, json); }  }
Groups { public void update(int id, String name) { String url = WxEndpoint.get("url.group.update"); String json = String.format("{\"group\":{\"id\":%s,\"name\":\"%s\"}}", id, name); logger.debug("update group: {}", json); wxClient.post(url, json); }  static Groups defaultGroups(); static Groups with(AppSetting appSetting); void setWxClient(WxClient wxClient); Group create(String name); List<Group> list(); void update(int id, String name); void delete(int id); int getUserGroup(String openId); void move(String openId, int group); void move(List<String> openIds, int group); }
Groups { public void update(int id, String name) { String url = WxEndpoint.get("url.group.update"); String json = String.format("{\"group\":{\"id\":%s,\"name\":\"%s\"}}", id, name); logger.debug("update group: {}", json); wxClient.post(url, json); }  static Groups defaultGroups(); static Groups with(AppSetting appSetting); void setWxClient(WxClient wxClient); Group create(String name); List<Group> list(); void update(int id, String name); void delete(int id); int getUserGroup(String openId); void move(String openId, int group); void move(List<String> openIds, int group);  }