use of com.bc.pmpheep.back.po.WriterUserRole in project pmph by BCSquad.
the class WriterUserRoleServiceTest method testUpdateWriterUserRole.
@Test
@Rollback(Const.ISROLLBACK)
public void testUpdateWriterUserRole() {
WriterUserRole writerUserRole = this.addWriterUserRole();
writerUserRole.setRoleId(3L);
writerUserRole.setUserId(4L);
Integer aInteger = testService.updateWriterUserRole(writerUserRole);
Assert.assertTrue("是否修改成功", aInteger > 0 ? true : false);
}
use of com.bc.pmpheep.back.po.WriterUserRole 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);
}
Aggregations