use of com.bc.pmpheep.general.po.Message in project pmph by BCSquad.
the class MessageServiceTest method get.
@Test
@SuppressWarnings("deprecation")
public void get() {
Message message = new Message(str);
Message msg = messageService.add(message);
Assert.assertNotNull("插入消息后返回的Message.id不应为空", msg.getId());
message = messageService.get(msg.getId());
messageService.removeAll();
Assert.assertTrue("获取到的消息内容和插入时不一致", str.equals(message.getContent()));
}
use of com.bc.pmpheep.general.po.Message in project pmph by BCSquad.
the class MessageServiceTest method update.
@Test
@SuppressWarnings("deprecation")
public void update() {
Message message = new Message(str);
Message msg = messageService.add(message);
Assert.assertNotNull("插入消息后返回的Message.id不应为空", msg.getId());
msg.setContent("Do you LOVE me?");
messageService.update(msg);
message = messageService.get(msg.getId());
messageService.removeAll();
logger.info("更新后的Message对象 id={}, content={}", message.getId(), message.getContent());
Assert.assertTrue("更新后的消息内容不正确", msg.getContent().equals(message.getContent()));
}
Aggregations