use of com.bc.pmpheep.back.po.WriterUser in project pmph by BCSquad.
the class WriterUserTest method testAddWriterUserOfBack.
/**
* 后台添加作家用户
*/
@Test
@Rollback(Const.ISROLLBACK)
public void testAddWriterUserOfBack() {
WriterUser writerUser = this.addWriterUser();
writerUser.setUsername("zuojiayonghu");
writerUser.setNickname("昵称");
writerUser.setHandphone("13488889898");
writerUser.setEmail("123@126.com");
Assert.assertTrue("添加失败", userService.addWriterUserOfBack(writerUser).equals("SUCCESS"));
}
use of com.bc.pmpheep.back.po.WriterUser in project pmph by BCSquad.
the class WriterUserTest method testAdd.
/**
* WriterUser 添加Test
*/
@Test
@Rollback(Const.ISROLLBACK)
public void testAdd() {
WriterUser writerUser = this.addWriterUser();
Assert.assertNotNull("添加失败", writerUser.getId());
}
use of com.bc.pmpheep.back.po.WriterUser in project pmph by BCSquad.
the class WriterUserTest method testUpdateWriterUserOfBack.
/**
* :修改作家用户
*/
@Test
@Rollback(Const.ISROLLBACK)
public void testUpdateWriterUserOfBack() {
WriterUser writerUser = this.addWriterUser();
writerUser.setUsername(writerUser.getUsername());
writerUser.setRealname("姓名");
Assert.assertNotNull("修改失败", userService.updateWriterUserOfBack(writerUser));
}
use of com.bc.pmpheep.back.po.WriterUser in project pmph by BCSquad.
the class WriterUserTest method testBackWriterUser.
/**
* 查询
*/
// @Test
// @Rollback(Const.ISROLLBACK)
// public void testGetLists() {
// WriterUser wtUser;
// List<WriterUser> wtUsers;
// List<WriterPermission> listPermissions;
// wtUsers = userService.getList();// 查询所有
// Assert.assertNotNull(wtUsers);
// wtUser = userService.getByUsernameAndPassword("test1", ShiroKit.md5("123", "test1"));//
// 按UserName
// Assert.assertNotNull(wtUser);
// wtUser = userService.get(1L);// 按ID查询对象
// Assert.assertNotNull(wtUser);
// wtUser = userService.login("test1", "123");
// Assert.assertNotNull(wtUser);
// wtUsers = userService.getListByRole(1L);
// Assert.assertNotNull(wtUsers);
// listPermissions = userService.getListAllResource(1L);
// Assert.assertNotNull(listPermissions);
// List<String> listRoleNameList = userService.getListRoleSnByUser(1L);
// Assert.assertNotNull(listRoleNameList);
// List<WriterRole> pr = userService.getListUserRole(1L);
// Assert.assertNotNull(pr);
// }
/**
* writerUser 更新方法
*/
// @Test
// @Rollback(Const.ISROLLBACK)
// public void testUpdatePmphUser() {
// WriterUser writerUser = new WriterUser();
// writerUser.setId(18L);
// writerUser.setUsername("admin1");
// List<Long> userIdList = new ArrayList<Long>();
// userIdList.add(1L);
// userIdList.add(2L);
// WriterUser pu = userService.update(writerUser);
// Assert.assertNotNull(pu);
// WriterUser pu1 = userService.update(writerUser, userIdList);
// Assert.assertNotNull(pu1);
// }
/**
* 功能描述:作家用户管理页面的单元测试
*/
@Test
@Rollback(Const.ISROLLBACK)
public void testBackWriterUser() {
WriterUser writerUser = this.addWriterUser();
// PageParameter<GroupMemberWriterUserVO> pageParameter = new PageParameter<>(1,
// 20);
// GroupMemberWriterUserVO groupMemberWriterUserVO = new
// GroupMemberWriterUserVO();
// groupMemberWriterUserVO.setBookname(null);
// groupMemberWriterUserVO.setChosenPosition(null);
// groupMemberWriterUserVO.setName(null);
// pageParameter.setParameter(groupMemberWriterUserVO);
// PageResult<GroupMemberWriterUserVO> pageResult =
// userService.listGroupMemberWriterUsers(pageParameter);
// Assert.assertNotNull(pageResult);
// logger.debug(pageResult.toString());
PageParameter<WriterUserManagerVO> pageParameter2 = new PageParameter<>();
WriterUserManagerVO writerUserManagerVO = new WriterUserManagerVO();
writerUserManagerVO.setName(null);
writerUserManagerVO.setOrgName(null);
writerUserManagerVO.setRank(null);
pageParameter2.setPageNumber(1);
pageParameter2.setPageSize(20);
pageParameter2.setParameter(writerUserManagerVO);
PageResult<WriterUserManagerVO> pageResult2 = userService.getListWriterUser(pageParameter2, null);
Assert.assertNotNull(pageResult2);
}
Aggregations