Search in sources :

Example 11 with WriterRole

use of com.bc.pmpheep.back.po.WriterRole 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);
}
Also used : WriterUserRole(com.bc.pmpheep.back.po.WriterUserRole) ArrayList(java.util.ArrayList) WriterUser(com.bc.pmpheep.back.po.WriterUser) WriterRole(com.bc.pmpheep.back.po.WriterRole) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest) Rollback(org.springframework.test.annotation.Rollback)

Aggregations

WriterRole (com.bc.pmpheep.back.po.WriterRole)11 BaseTest (com.bc.pmpheep.test.BaseTest)10 Test (org.junit.Test)10 Rollback (org.springframework.test.annotation.Rollback)10 WriterUser (com.bc.pmpheep.back.po.WriterUser)2 ArrayList (java.util.ArrayList)2 WriterPermission (com.bc.pmpheep.back.po.WriterPermission)1 WriterRolePermission (com.bc.pmpheep.back.po.WriterRolePermission)1 WriterUserRole (com.bc.pmpheep.back.po.WriterUserRole)1 IOException (java.io.IOException)1 HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1 LinkedList (java.util.LinkedList)1 Map (java.util.Map)1