test/net/java/sip/communicator/slick/protocol/jabber/TestOperationSetMultiUserChat2.java
/**
     * After a user joins a room, we look if the room is present on the list
     * returned by
     * <tt>OperationSetMultiUserChat#getCurrentlyJoinedChatRooms</tt>.
     *
     */
After a user joins a room, we look if the room is present on the list
returned by
OperationSetMultiUserChat#getCurrentlyJoinedChatRooms.
After a user joins a room we look if the room is present on the list returned by OperationSetMultiUserChat#getCurrentlyJoinedChatRooms .
public void testGetJoinedChatRoom()
        throws OperationFailedException,
               OperationNotSupportedException
    {
        String testRoomName = testRoomBaseName + roomID++;
        ChatRoom opSet1Room =
            opSetMUC1.createChatRoom(testRoomName, null);
        opSet1Room.join();
        assertTrue(
            "we are not in the room we just joined", opSet1Room.isJoined());
        List<ChatRoom> joinedRooms = opSetMUC1.getCurrentlyJoinedChatRooms();
        for (ChatRoom room : joinedRooms)
        {
            if (room.getName().equals(opSet1Room.getName()))
            {
                return; 
            }
        }
        fail("the joined room list does not contains a joined room");
    }
public void testGetJoinedChatRoom ( ) throws OperationFailedException , OperationNotSupportedException { String testRoomName = testRoomBaseName + roomID ++ ; ChatRoom opSet1Room = opSetMUC1 . createChatRoom ( testRoomName , null ) ; opSet1Room . join ( ) ; assertTrue ( "we are not in the room we just joined" , opSet1Room . isJoined ( ) ) ; List < ChatRoom > joinedRooms = opSetMUC1 . getCurrentlyJoinedChatRooms ( ) ; for ( ChatRoom room : joinedRooms ) { if ( room . getName ( ) . equals ( opSet1Room . getName ( ) ) ) { return ; } } fail ( "the joined room list does not contains a joined room" ) ; }
After a user joins a room, we look if the room is present on the list
 returned by
 <tt>OperationSetMultiUserChat#getCurrentlyJoinedChatRooms</tt>.
After a user joins a room we look if the room is present on the list returned by <tt > OperationSetMultiUserChat#getCurrentlyJoinedChatRooms< / tt > .
// we create the test room // is the joined room list up to date ? // ok opSet1Room is on the joined rooms list