use of jetbrains.communicator.p2p.commands.P2PNetworkMessage in project intellij-plugins by JetBrains.
the class AbstractMessageDispatcherTest method testPersistency.
public void testPersistency() throws Exception {
Message failedMessage = new P2PNetworkMessage("foo", "foo2", new String[] { "test" });
myDispatcher.performDispatch(myUser, failedMessage);
myDispatcher.save();
AbstractMessageDispatcher dispatcher = createDispatcher();
assertEquals("queue should persist", 1, dispatcher.getPendingMessages(myUser).length);
Message message = dispatcher.getPendingMessages(myUser)[0];
assertTrue("queue should persist", message instanceof P2PNetworkMessage);
assertEquals("test", ((P2PNetworkMessage) message).getParameters()[0]);
dispatcher.dispose();
}
Aggregations