|  |  | @@ -24,6 +24,8 @@ public class WxGroupAPITest { | 
		
	
		
			
			|  |  |  | @Inject | 
		
	
		
			
			|  |  |  | protected WxServiceImpl wxService; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | protected WxGroup group; | 
		
	
		
			
			|  |  |  |  | 
		
	
		
			
			|  |  |  | public void testGroupCreate() throws WxErrorException { | 
		
	
		
			
			|  |  |  | WxGroup res = wxService.groupCreate("测试分组1"); | 
		
	
		
			
			|  |  |  | Assert.assertEquals(res.getName(), "测试分组1"); | 
		
	
	
		
			
				|  |  | @@ -35,7 +37,7 @@ public class WxGroupAPITest { | 
		
	
		
			
			|  |  |  | Assert.assertNotNull(groupList); | 
		
	
		
			
			|  |  |  | Assert.assertTrue(groupList.size() > 0); | 
		
	
		
			
			|  |  |  | for (WxGroup g : groupList) { | 
		
	
		
			
			|  |  |  | System.out.println(g.toString()); | 
		
	
		
			
			|  |  |  | group = g; | 
		
	
		
			
			|  |  |  | Assert.assertNotNull(g.getName()); | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | } | 
		
	
	
		
			
				|  |  | @@ -44,12 +46,18 @@ public class WxGroupAPITest { | 
		
	
		
			
			|  |  |  | public void testGroupQueryUserGroup() throws WxErrorException { | 
		
	
		
			
			|  |  |  | WxXmlConfigStorage configStorage = (WxXmlConfigStorage) wxService.wxConfigStorage; | 
		
	
		
			
			|  |  |  | long groupid = wxService.groupQueryUserGroup(configStorage.getOpenId()); | 
		
	
		
			
			|  |  |  | Assert.assertTrue(groupid != -1l); | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  |  | 
		
	
		
			
			|  |  |  | @Test(dependsOnMethods={"testGroupGet", "testGroupCreate"}) | 
		
	
		
			
			|  |  |  | public void getGroupUpdate() throws WxErrorException { | 
		
	
		
			
			|  |  |  | WxGroup group = new WxGroup(); | 
		
	
		
			
			|  |  |  | group.setId(3); | 
		
	
		
			
			|  |  |  | group.setName("未命名分组"); | 
		
	
		
			
			|  |  |  | group.setName("分组改名"); | 
		
	
		
			
			|  |  |  | wxService.groupUpdate(group); | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | @Test(dependsOnMethods={"testGroupGet", "testGroupCreate"}) | 
		
	
		
			
			|  |  |  | public void getGroupMoveUser() throws WxErrorException { | 
		
	
		
			
			|  |  |  | WxXmlConfigStorage configStorage = (WxXmlConfigStorage) wxService.wxConfigStorage; | 
		
	
		
			
			|  |  |  | wxService.groupMoveUser(configStorage.getOpenId(), group.getId()); | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | } |