use of org.jivesoftware.smackx.muclight.element.MUCLightElements.ConfigurationsChangeExtension in project Smack by igniterealtime.
the class MUCLightConfigurationsChangeExtensionTest method checkRoomNameChangeExtension.
@Test
public void checkRoomNameChangeExtension() throws Exception {
Message configurationsMessage = (Message) PacketParserUtils.parseStanza(messageWithRoomNameChangeExample);
ConfigurationsChangeExtension configurationsChangeExtension = ConfigurationsChangeExtension.from(configurationsMessage);
Assert.assertEquals("zaqwsx", configurationsChangeExtension.getPrevVersion());
Assert.assertEquals("zxcvbnm", configurationsChangeExtension.getVersion());
Assert.assertEquals("A Darker Cave", configurationsChangeExtension.getRoomName());
Assert.assertNull(configurationsChangeExtension.getSubject());
Assert.assertNull(configurationsChangeExtension.getCustomConfigs());
Assert.assertEquals(messageWithRoomNameChangeExample, configurationsMessage.toXML().toString());
}
use of org.jivesoftware.smackx.muclight.element.MUCLightElements.ConfigurationsChangeExtension in project Smack by igniterealtime.
the class MUCLightConfigurationsChangeExtensionTest method checkSubjectChangeExtension.
@Test
public void checkSubjectChangeExtension() throws Exception {
Message configurationsMessage = (Message) PacketParserUtils.parseStanza(messageWithSubjectChangeExample);
ConfigurationsChangeExtension configurationsChangeExtension = ConfigurationsChangeExtension.from(configurationsMessage);
Assert.assertEquals("asdfghj000", configurationsChangeExtension.getPrevVersion());
Assert.assertEquals("asdfghj", configurationsChangeExtension.getVersion());
Assert.assertEquals("To be or not to be?", configurationsChangeExtension.getSubject());
Assert.assertNull(configurationsChangeExtension.getRoomName());
Assert.assertNull(configurationsChangeExtension.getCustomConfigs());
Assert.assertEquals(messageWithSubjectChangeExample, configurationsMessage.toXML().toString());
}
use of org.jivesoftware.smackx.muclight.element.MUCLightElements.ConfigurationsChangeExtension in project Smack by igniterealtime.
the class MUCLightConfigurationsChangeExtensionTest method checkConfigsChangeExtension.
@Test
public void checkConfigsChangeExtension() throws Exception {
Message configurationsMessage = (Message) PacketParserUtils.parseStanza(messageWithConfigsChangeExample);
ConfigurationsChangeExtension configurationsChangeExtension = ConfigurationsChangeExtension.from(configurationsMessage);
Assert.assertEquals("zaqwsx", configurationsChangeExtension.getPrevVersion());
Assert.assertEquals("zxcvbnm", configurationsChangeExtension.getVersion());
Assert.assertEquals("A Darker Cave", configurationsChangeExtension.getRoomName());
Assert.assertNull(configurationsChangeExtension.getSubject());
Assert.assertEquals("blue", configurationsChangeExtension.getCustomConfigs().get("color"));
Assert.assertEquals(messageWithConfigsChangeExample, configurationsMessage.toXML().toString());
}
Aggregations