Search in sources :

Example 6 with WriterRolePermission

use of com.bc.pmpheep.back.po.WriterRolePermission in project pmph by BCSquad.

the class WriterRolePermissionServiceTest method testUpdateWriterRolePermission.

@Test
@Rollback(Const.ISROLLBACK)
public void testUpdateWriterRolePermission() {
    WriterRolePermission writerRolePermission = this.addWriterRolePermission();
    Integer aInteger = writerRolePermissionService.updateWriterRolePermission(writerRolePermission);
    Assert.assertTrue("更新成功失败", aInteger > 0 ? true : false);
}
Also used : WriterRolePermission(com.bc.pmpheep.back.po.WriterRolePermission) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest) Rollback(org.springframework.test.annotation.Rollback)

Example 7 with WriterRolePermission

use of com.bc.pmpheep.back.po.WriterRolePermission in project pmph by BCSquad.

the class WriterRoleServiceTest method testGetResourceRole.

@Test
@Rollback(Const.ISROLLBACK)
public void testGetResourceRole() {
    List<Long> permissionIds = new ArrayList<>();
    permissionIds.add(1L);
    writerRoleService.addRoleResource(new Long(2L), permissionIds);
    WriterRolePermission writerRolePermission = writerRoleService.getResourceRole(2L, 1L);
    Assert.assertNotNull("是否查询成功", writerRolePermission);
}
Also used : WriterRolePermission(com.bc.pmpheep.back.po.WriterRolePermission) ArrayList(java.util.ArrayList) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest) Rollback(org.springframework.test.annotation.Rollback)

Aggregations

WriterRolePermission (com.bc.pmpheep.back.po.WriterRolePermission)7 BaseTest (com.bc.pmpheep.test.BaseTest)6 Test (org.junit.Test)6 Rollback (org.springframework.test.annotation.Rollback)6 ArrayList (java.util.ArrayList)2 WriterPermission (com.bc.pmpheep.back.po.WriterPermission)1 WriterRole (com.bc.pmpheep.back.po.WriterRole)1 CheckedServiceException (com.bc.pmpheep.service.exception.CheckedServiceException)1