use of com.bc.pmpheep.back.po.WriterUser in project pmph by BCSquad.
the class WriterUserServiceTest method testGetListsTest.
/**
* 查询
*/
@Test
@Rollback(Const.ISROLLBACK)
public void testGetListsTest() {
WriterUser writerUser = this.addWriterUser();
// WriterUser wtUser;
// List<WriterUser> pmUsers;
// List<WriterPermission> listPermissions;
// wtUser = writerUserService.login("test1", "123");
List<WriterRole> pr = writerUserService.getListUserRole(writerUser.getId());
Assert.assertNotNull("获取失败", pr);
}
use of com.bc.pmpheep.back.po.WriterUser in project pmph by BCSquad.
the class WriterUserServiceTest method testGetListRoleSnByUser.
@Test
@Rollback(Const.ISROLLBACK)
public void testGetListRoleSnByUser() {
WriterUser writerUser = this.addWriterUser();
List<String> listRoleNameList = writerUserService.getListRoleSnByUser(writerUser.getId());
// 查询所有
Assert.assertNotNull("查询失败", listRoleNameList);
}
use of com.bc.pmpheep.back.po.WriterUser in project pmph by BCSquad.
the class WriterUserServiceTest method testDelete.
@Test
@Rollback(Const.ISROLLBACK)
public void testDelete() {
WriterRole WriterRole = this.addWriterRole();
WriterUser writerUser = writerUserService.add(new WriterUser("test1", "123"));
WriterUserRole writerUserRole = writerUserRoleService.addWriterUserRole(new WriterUserRole(writerUser.getId(), WriterRole.getId()));
List<Long> userIdList = new ArrayList<Long>();
userIdList.add(writerUserRole.getId());
Assert.assertTrue("是否删除成功", writerUserService.deleteUserAndRole(userIdList) > 0 ? true : false);
}
use of com.bc.pmpheep.back.po.WriterUser in project pmph by BCSquad.
the class WriterUserServiceTest method testUpdate.
@Test
@Rollback(Const.ISROLLBACK)
public void testUpdate() {
WriterUser writerUser = this.addWriterUser();
List<Long> userIdList = new ArrayList<Long>();
userIdList.add(1L);
userIdList.add(2L);
writerUser.setRealname("姓名");
writerUser.setPassword("1234");
WriterUser pu1 = writerUserService.update(writerUser, userIdList);
Assert.assertNotNull("是否更新成功", pu1);
}
use of com.bc.pmpheep.back.po.WriterUser in project pmph by BCSquad.
the class WriterUserServiceTest method testGetList.
@Test
@Rollback(Const.ISROLLBACK)
public void testGetList() {
WriterUser writerUser = this.addWriterUser();
Assert.assertNotNull("查询失败", writerUserService.getList());
// 查询所有
;
}
Aggregations