Examples of addOccupant()


Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.addOccupant()

        return new MUCPresenceHandler(conference);
    }
   
    public void testChangeNick() throws Exception {
        Room room = conference.findRoom(ROOM1_JID);
        room.addOccupant(OCCUPANT1_JID, "nick");
        room.addOccupant(OCCUPANT2_JID, "nick 2");

        changeNick(OCCUPANT1_JID, new EntityImpl(ROOM1_JID, "new nick"));
       
        Occupant occupant = room.findOccupantByJID(OCCUPANT1_JID);
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.addOccupant()

    }
   
    public void testChangeNick() throws Exception {
        Room room = conference.findRoom(ROOM1_JID);
        room.addOccupant(OCCUPANT1_JID, "nick");
        room.addOccupant(OCCUPANT2_JID, "nick 2");

        changeNick(OCCUPANT1_JID, new EntityImpl(ROOM1_JID, "new nick"));
       
        Occupant occupant = room.findOccupantByJID(OCCUPANT1_JID);
        assertEquals("new nick", occupant.getName());
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.addOccupant()

                Arrays.asList(availbleItem), null);
    }
   
    public void testChangeNickWithDuplicateNick() throws Exception {
        Room room = conference.findRoom(ROOM1_JID);
        room.addOccupant(OCCUPANT1_JID, "nick");
        room.addOccupant(OCCUPANT2_JID, "nick 2");
       
        Stanza error = changeNick(OCCUPANT1_JID, new EntityImpl(ROOM1_JID,"nick 2"));
       
        assertNotNull(error);
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.addOccupant()

    }
   
    public void testChangeNickWithDuplicateNick() throws Exception {
        Room room = conference.findRoom(ROOM1_JID);
        room.addOccupant(OCCUPANT1_JID, "nick");
        room.addOccupant(OCCUPANT2_JID, "nick 2");
       
        Stanza error = changeNick(OCCUPANT1_JID, new EntityImpl(ROOM1_JID,"nick 2"));
       
        assertNotNull(error);
    }
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.addOccupant()

    private static final String SUBJECT = "Subject";

    public void testChangeSubjectNonModeratorAllowed() throws Exception {
        Room room = conference.findOrCreateRoom(ROOM2_JID, "Room 2", RoomType.OpenSubject);
        room.addOccupant(OCCUPANT1_JID, "nick");
        room.addOccupant(OCCUPANT2_JID, "Nick 2");

        // send message to room
        assertNull(sendMessage(OCCUPANT1_JID, ROOM2_JID, GROUPCHAT, null, null, SUBJECT));
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.addOccupant()

    private static final String SUBJECT = "Subject";

    public void testChangeSubjectNonModeratorAllowed() throws Exception {
        Room room = conference.findOrCreateRoom(ROOM2_JID, "Room 2", RoomType.OpenSubject);
        room.addOccupant(OCCUPANT1_JID, "nick");
        room.addOccupant(OCCUPANT2_JID, "Nick 2");

        // send message to room
        assertNull(sendMessage(OCCUPANT1_JID, ROOM2_JID, GROUPCHAT, null, null, SUBJECT));

        // verify stanzas to existing occupants on the exiting user
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.addOccupant()

                occupant2Queue.getNext());
    }

    public void testChangeSubject() throws Exception {
        Room room = conference.findOrCreateRoom(ROOM2_JID, "Room 2");
        room.addOccupant(OCCUPANT1_JID, "nick").setRole(Role.Moderator);
        room.addOccupant(OCCUPANT2_JID, "Nick 2");

        // send message to room
        assertNull(sendMessage(OCCUPANT1_JID, ROOM2_JID, GROUPCHAT, null, null, SUBJECT));
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.addOccupant()

    }

    public void testChangeSubject() throws Exception {
        Room room = conference.findOrCreateRoom(ROOM2_JID, "Room 2");
        room.addOccupant(OCCUPANT1_JID, "nick").setRole(Role.Moderator);
        room.addOccupant(OCCUPANT2_JID, "Nick 2");

        // send message to room
        assertNull(sendMessage(OCCUPANT1_JID, ROOM2_JID, GROUPCHAT, null, null, SUBJECT));

        // verify stanzas to existing occupants on the exiting user
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.addOccupant()

                occupant2Queue.getNext());
    }

    public void testChangeSubjectNonModerator() throws Exception {
        Room room = conference.findOrCreateRoom(ROOM2_JID, "Room 2");
        room.addOccupant(OCCUPANT1_JID, "nick");
        room.addOccupant(OCCUPANT2_JID, "Nick 2");

        // send message to room
        Stanza error = sendMessage(OCCUPANT1_JID, ROOM2_JID, GROUPCHAT, null, null, SUBJECT);
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.extension.xep0045_muc.model.Room.addOccupant()

    }

    public void testChangeSubjectNonModerator() throws Exception {
        Room room = conference.findOrCreateRoom(ROOM2_JID, "Room 2");
        room.addOccupant(OCCUPANT1_JID, "nick");
        room.addOccupant(OCCUPANT2_JID, "Nick 2");

        // send message to room
        Stanza error = sendMessage(OCCUPANT1_JID, ROOM2_JID, GROUPCHAT, null, null, SUBJECT);

        assertMessageErrorStanza(error, ROOM2_JID, OCCUPANT1_JID, "auth", "forbidden",
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.