Package rocks.xmpp.extensions.data.model

Examples of rocks.xmpp.extensions.data.model.DataForm.findField()


        Assert.assertEquals(fieldRoomName.getValues().size(), 1);
        Assert.assertEquals(fieldRoomName.getValues().get(0), "Name");
        Assert.assertEquals(roomConfigurationForm.getRoomName(), "Name");

        roomConfigurationForm.setOwners(Arrays.asList(Jid.valueOf("test3@domain"), Jid.valueOf("test4@domain")));
        DataForm.Field fieldOwners = dataForm.findField("muc#roomconfig_roomowners");
        Assert.assertNotNull(fieldOwners);
        Assert.assertEquals(fieldOwners.getValues().size(), 2);
        Assert.assertEquals(fieldOwners.getValues().get(0), "test3@domain");
        Assert.assertEquals(fieldOwners.getValues().get(1), "test4@domain");
        Assert.assertEquals(roomConfigurationForm.getOwners(), Arrays.asList(Jid.valueOf("test3@domain"), Jid.valueOf("test4@domain")));
View Full Code Here


        Assert.assertEquals(fieldOwners.getValues().get(0), "test3@domain");
        Assert.assertEquals(fieldOwners.getValues().get(1), "test4@domain");
        Assert.assertEquals(roomConfigurationForm.getOwners(), Arrays.asList(Jid.valueOf("test3@domain"), Jid.valueOf("test4@domain")));

        roomConfigurationForm.setPassword("Pass");
        DataForm.Field fieldRoomPassword = dataForm.findField("muc#roomconfig_roomsecret");
        Assert.assertNotNull(fieldRoomPassword);
        Assert.assertEquals(fieldRoomPassword.getValues().size(), 1);
        Assert.assertEquals(fieldRoomPassword.getValues().get(0), "Pass");
        Assert.assertEquals(roomConfigurationForm.getPassword(), "Pass");
View Full Code Here

        Assert.assertEquals(fieldRoomPassword.getValues().get(0), "Pass");
        Assert.assertEquals(roomConfigurationForm.getPassword(), "Pass");


        roomConfigurationForm.setRolesWhichMayDiscoverRealJids(EnumSet.of(Role.MODERATOR));
        DataForm.Field fieldWhois = dataForm.findField("muc#roomconfig_whois");
        Assert.assertNotNull(fieldWhois);
        Assert.assertEquals(fieldWhois.getValues().size(), 1);
        Assert.assertEquals(fieldWhois.getValues().get(0), "moderators");
        Assert.assertEquals(roomConfigurationForm.getRolesWhichMayDiscoverRealJids(), EnumSet.of(Role.MODERATOR));
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.