Search in sources :

Example 6 with WriterUserManagerVO

use of com.bc.pmpheep.back.vo.WriterUserManagerVO in project pmph by BCSquad.

the class WriterUserServiceTest method testGetTeacherCheckList.

@Test
@Rollback(Const.ISROLLBACK)
public void testGetTeacherCheckList() {
    WriterUserManagerVO writerUserManagerVO = new WriterUserManagerVO();
    writerUserManagerVO.setRealname(null);
    PageParameter<WriterUserManagerVO> pageParameter = new PageParameter<WriterUserManagerVO>(1, 15, writerUserManagerVO);
    PageResult<WriterUserManagerVO> pageResult = new PageResult<WriterUserManagerVO>();
    pageResult = writerUserService.getTeacherCheckList(pageParameter);
    Assert.assertNotNull("获取失败", pageResult);
}
Also used : WriterUserManagerVO(com.bc.pmpheep.back.vo.WriterUserManagerVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) PageResult(com.bc.pmpheep.back.plugin.PageResult) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest) Rollback(org.springframework.test.annotation.Rollback)

Example 7 with WriterUserManagerVO

use of com.bc.pmpheep.back.vo.WriterUserManagerVO in project pmph by BCSquad.

the class WriterUserServiceTest method testGetListWriterUserVO.

@Test
@Rollback(Const.ISROLLBACK)
public void testGetListWriterUserVO() {
    WriterUser writerUser = this.addWriterUser();
    PageParameter pageParameter = new PageParameter<>();
    PageResult pageResult = new PageResult<>();
    WriterUserManagerVO managerVO = new WriterUserManagerVO();
    pageParameter.setParameter(managerVO);
    pageParameter.setPageSize(15);
    pageResult = writerUserService.getListWriterUser(pageParameter, null);
    Assert.assertNotNull("是否查询成功", pageResult);
// logger.info("查找成功{}", pageResult);
}
Also used : WriterUserManagerVO(com.bc.pmpheep.back.vo.WriterUserManagerVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) WriterUser(com.bc.pmpheep.back.po.WriterUser) PageResult(com.bc.pmpheep.back.plugin.PageResult) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest) Rollback(org.springframework.test.annotation.Rollback)

Example 8 with WriterUserManagerVO

use of com.bc.pmpheep.back.vo.WriterUserManagerVO in project pmph by BCSquad.

the class WriterUserTest method testGetTeacherCheckList.

/**
 * 获取教师审核列表
 */
@Test
@Rollback(Const.ISROLLBACK)
public void testGetTeacherCheckList() {
    WriterUserManagerVO writerUserManagerVO = new WriterUserManagerVO();
    PageParameter<WriterUserManagerVO> pageParameter = new PageParameter<WriterUserManagerVO>(1, 10, writerUserManagerVO);
    Assert.assertNotNull("获取教师列表失败", userService.getTeacherCheckList(pageParameter));
}
Also used : WriterUserManagerVO(com.bc.pmpheep.back.vo.WriterUserManagerVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest) Rollback(org.springframework.test.annotation.Rollback)

Example 9 with WriterUserManagerVO

use of com.bc.pmpheep.back.vo.WriterUserManagerVO 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);
}
Also used : WriterUserManagerVO(com.bc.pmpheep.back.vo.WriterUserManagerVO) PageParameter(com.bc.pmpheep.back.plugin.PageParameter) WriterUser(com.bc.pmpheep.back.po.WriterUser) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest) Rollback(org.springframework.test.annotation.Rollback)

Aggregations

WriterUserManagerVO (com.bc.pmpheep.back.vo.WriterUserManagerVO)9 PageParameter (com.bc.pmpheep.back.plugin.PageParameter)7 PageResult (com.bc.pmpheep.back.plugin.PageResult)4 BaseTest (com.bc.pmpheep.test.BaseTest)4 Test (org.junit.Test)4 Rollback (org.springframework.test.annotation.Rollback)4 LogDetail (com.bc.pmpheep.annotation.LogDetail)2 Declaration (com.bc.pmpheep.back.po.Declaration)2 WriterUser (com.bc.pmpheep.back.po.WriterUser)2 ResponseBean (com.bc.pmpheep.controller.bean.ResponseBean)2 CheckedServiceException (com.bc.pmpheep.service.exception.CheckedServiceException)2 HashMap (java.util.HashMap)2 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)2 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)2 DecPositionPublished (com.bc.pmpheep.back.po.DecPositionPublished)1 PmphGroup (com.bc.pmpheep.back.po.PmphGroup)1 IOException (java.io.IOException)1 LinkedHashMap (java.util.LinkedHashMap)1 LinkedList (java.util.LinkedList)1 Map (java.util.Map)1