Search in sources :

Example 31 with WriterUser

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

the class WriterUserServiceTest method testAddWriterUserService.

@Test
@Rollback(Const.ISROLLBACK)
public void testAddWriterUserService() {
    WriterUser writerUser = this.addWriterUser();
    Assert.assertNotNull("不否保存成功", writerUser.getId());
// logger.info("添加了{}", writerUser.toString());
}
Also used : WriterUser(com.bc.pmpheep.back.po.WriterUser) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest) Rollback(org.springframework.test.annotation.Rollback)

Example 32 with WriterUser

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

the class WriterUserServiceTest method testUpdateWriterUserById.

@Test
@Rollback(Const.ISROLLBACK)
public void testUpdateWriterUserById() {
    WriterUser writerUser = this.addWriterUser();
    writerUser.setPassword("1111");
    writerUser = writerUserService.update(writerUser);
    Assert.assertNotNull("是否更新成功", writerUser);
}
Also used : WriterUser(com.bc.pmpheep.back.po.WriterUser) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest) Rollback(org.springframework.test.annotation.Rollback)

Example 33 with WriterUser

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

the class WriterUserServiceTest method testUpdatePmphUserTest.

// @Test
// @Rollback(Const.ISROLLBACK)
// public void testLogin(){
// WriterUser writerUser=this.addWriterUser();
// Assert.assertNotNull("获取失败",writerUserService.login("user1","123"));// 查询所有
// }
// @Test
// @Rollback(Const.ISROLLBACK)
// public void testGetByUsernameAndPassword() {
// WriterUser writerUser=this.addWriterUser();
// writerUser = writerUserService.getByUsernameAndPassword(writerUser.getUsername(),
// writerUser.getPassword());// 按UserName
// Assert.assertNotNull("获取失败",writerUser);
// }
/**
 * PmphUser 更新方法
 */
@Test
@Rollback(Const.ISROLLBACK)
public void testUpdatePmphUserTest() {
    WriterUser writerUser = this.addWriterUser();
    List<Long> userIdList = new ArrayList<Long>();
    userIdList.add(1L);
    userIdList.add(2L);
    writerUser.setRealname("姓名");
    writerUser.setPassword("1234");
    WriterUser pu = writerUserService.update(writerUser);
    Assert.assertNotNull("是否更新成功", pu);
}
Also used : ArrayList(java.util.ArrayList) WriterUser(com.bc.pmpheep.back.po.WriterUser) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest) Rollback(org.springframework.test.annotation.Rollback)

Example 34 with WriterUser

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

the class WriterUserServiceTest method testGetListByRole.

@Test
@Rollback(Const.ISROLLBACK)
public void testGetListByRole() {
    WriterUser writerUser = this.addWriterUser();
    // 查询所有
    Assert.assertNotNull("查询失败", writerUserService.getListByRole(writerUser.getId()));
}
Also used : WriterUser(com.bc.pmpheep.back.po.WriterUser) Test(org.junit.Test) BaseTest(com.bc.pmpheep.test.BaseTest) Rollback(org.springframework.test.annotation.Rollback)

Example 35 with WriterUser

use of com.bc.pmpheep.back.po.WriterUser 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)

Aggregations

WriterUser (com.bc.pmpheep.back.po.WriterUser)49 BaseTest (com.bc.pmpheep.test.BaseTest)26 Test (org.junit.Test)26 Rollback (org.springframework.test.annotation.Rollback)24 CheckedServiceException (com.bc.pmpheep.service.exception.CheckedServiceException)17 ArrayList (java.util.ArrayList)14 PmphUser (com.bc.pmpheep.back.po.PmphUser)11 UserMessage (com.bc.pmpheep.back.po.UserMessage)7 OrgUser (com.bc.pmpheep.back.po.OrgUser)6 WebScocketMessage (com.bc.pmpheep.websocket.WebScocketMessage)6 DesRun (com.bc.pmpheep.back.util.DesRun)4 Message (com.bc.pmpheep.general.po.Message)4 HashMap (java.util.HashMap)4 PageResult (com.bc.pmpheep.back.plugin.PageResult)3 MyMessageVO (com.bc.pmpheep.back.vo.MyMessageVO)3 PageParameter (com.bc.pmpheep.back.plugin.PageParameter)2 Material (com.bc.pmpheep.back.po.Material)2 MessageAttachment (com.bc.pmpheep.back.po.MessageAttachment)2 Org (com.bc.pmpheep.back.po.Org)2 PmphRole (com.bc.pmpheep.back.po.PmphRole)2