test/net/java/sip/communicator/slick/protocol/jabber/TestOperationSetMultiUserChat2.java
/**
     * <tt>testJoinRoom</tt> looks if <tt>someRoom.isJoined</tt> will returns
     * true for an user after he joins a room with <tt>someRoom.join()</tt>
     *
     * @throws OperationFailedException
     * @throws OperationNotSupportedException
     */
testJoinRoom looks if someRoom.isJoined will returns
true for an user after he joins a room with someRoom.join()


testJoinRoom looks if someRoom . isJoined will returns true for an user after he joins a room with someRoom . join ()
public void testJoinRoom()
        throws OperationFailedException,
               OperationNotSupportedException
    {
        String testRoomName = testRoomBaseName + roomID++;
        MUCEventCollector opSet1Collector =
            new MUCEventCollector(opSetMUC1, MUCEventCollector.EVENT_PRESENCE);
        ChatRoom opSet1Room =
            opSetMUC1.createChatRoom(testRoomName, null);
        opSet1Room.join();
        opSet1Collector.waitForEvent(10000);
        assertEquals("user1 didn't get an event since he joined"
            , 1, opSet1Collector.collectedEvents.size());
        LocalUserChatRoomPresenceChangeEvent changeEvent =
            (LocalUserChatRoomPresenceChangeEvent)
            opSet1Collector.collectedEvents.get(0);
        assertEquals("the event user1 received after he joined is no " +
            "LOCAL_USER_JOINED"
            , LocalUserChatRoomPresenceChangeEvent.LOCAL_USER_JOINED
            , changeEvent.getEventType());
        assertTrue(
            "we are not in the room we just joined", opSet1Room.isJoined());
        assertTrue("user is not listed in the room with his nickname",
            nameIsOnMemberList(
            opSet1Room.getUserNickname(), opSet1Room.getMembers()));
    }
public void testJoinRoom ( ) throws OperationFailedException , OperationNotSupportedException { String testRoomName = testRoomBaseName + roomID ++ ; MUCEventCollector opSet1Collector = new MUCEventCollector ( opSetMUC1 , MUCEventCollector . EVENT_PRESENCE ) ; ChatRoom opSet1Room = opSetMUC1 . createChatRoom ( testRoomName , null ) ; opSet1Room . join ( ) ; opSet1Collector . waitForEvent ( 10000 ) ; assertEquals ( "user1 didn't get an event since he joined" , 1 , opSet1Collector . collectedEvents . size ( ) ) ; LocalUserChatRoomPresenceChangeEvent changeEvent = ( LocalUserChatRoomPresenceChangeEvent ) opSet1Collector . collectedEvents . get ( 0 ) ; assertEquals ( "the event user1 received after he joined is no " + "LOCAL_USER_JOINED" , LocalUserChatRoomPresenceChangeEvent . LOCAL_USER_JOINED , changeEvent . getEventType ( ) ) ; assertTrue ( "we are not in the room we just joined" , opSet1Room . isJoined ( ) ) ; assertTrue ( "user is not listed in the room with his nickname" , nameIsOnMemberList ( opSet1Room . getUserNickname ( ) , opSet1Room . getMembers ( ) ) ) ; }
<tt>testJoinRoom</tt> looks if <tt>someRoom.isJoined</tt> will returns
 true for an user after he joins a room with <tt>someRoom.join()</tt>
<tt > testJoinRoom< / tt > looks if <tt > someRoom . isJoined< / tt > will returns true for an user after he joins a room with <tt > someRoom . join () < / tt >
// we create the test room