use of jetbrains.communicator.core.IDEtalkEvent in project intellij-plugins by JetBrains.
the class JabberTransport_ConnectionTest method testAddUser_NotIdeTalk.
public void testAddUser_NotIdeTalk() throws Throwable {
addEventListener();
addUserFred();
IDEtalkEvent event = checkEvent(false);
assertTrue(event.toString(), event instanceof UserEvent.Added);
User user = ((UserEvent.Added) event).getUser();
assertEquals("Jabber user expected", "Jabber", user.getTransportCode());
assertEquals("Should add Jabber user", FRED, user.getName());
assertEquals("Wrong group", "aGroup", user.getGroup());
assertFalse(user.hasIDEtalkClient());
}
use of jetbrains.communicator.core.IDEtalkEvent in project intellij-plugins by JetBrains.
the class JabberTransport_ConnectionTest method testAddUser_IdeTalk.
public void testAddUser_IdeTalk() throws Throwable {
XMPPConnection conn = createLocalConnectionWithJabberUser("fred" + System.nanoTime(), JabberFacadeImpl.IDETALK_RESOURCE);
addEventListener();
final String fred = getUser(conn);
addUser(fred);
IDEtalkEvent event = checkEvent(false);
assertTrue(event.toString(), event instanceof UserEvent.Added);
User user = ((UserEvent.Added) event).getUser();
assertEquals("Jabber user expected", "Jabber", user.getTransportCode());
assertEquals("Should add Jabber user", fred, user.getName());
assertEquals("Wrong group", "aGroup", user.getGroup());
new WaitFor(TIMEOUT) {
@Override
protected boolean condition() {
return myFacade.getConnection().getRoster().getPresence(fred) != null;
}
};
assertTrue("User with IDEtalk resource", user.hasIDEtalkClient());
}
Aggregations