Search in sources :

Example 1 with FileTooLargeError

use of org.jivesoftware.smackx.httpfileupload.element.FileTooLargeError in project Smack by igniterealtime.

the class FileTooLargeErrorCreateTest method checkFileTooLargeErrorExtensionCreation.

@Test
public void checkFileTooLargeErrorExtensionCreation() {
    FileTooLargeError fileTooLargeError = new FileTooLargeError(20000);
    Assert.assertEquals(20000, fileTooLargeError.getMaxFileSize());
    Assert.assertEquals(fileTooLargeErrorExtensionExample, fileTooLargeError.toXML().toString());
}
Also used : FileTooLargeError(org.jivesoftware.smackx.httpfileupload.element.FileTooLargeError) Test(org.junit.Test)

Example 2 with FileTooLargeError

use of org.jivesoftware.smackx.httpfileupload.element.FileTooLargeError in project Smack by igniterealtime.

the class FileTooLargeErrorProviderTest method checkSlotErrorFileToLarge.

@Test
public void checkSlotErrorFileToLarge() throws Exception {
    IQ fileTooLargeErrorIQ = PacketParserUtils.parseStanza(slotErrorFileToLarge);
    Assert.assertEquals(IQ.Type.error, fileTooLargeErrorIQ.getType());
    FileTooLargeError fileTooLargeError = FileTooLargeError.from(fileTooLargeErrorIQ);
    Assert.assertEquals(20000, fileTooLargeError.getMaxFileSize());
}
Also used : FileTooLargeError(org.jivesoftware.smackx.httpfileupload.element.FileTooLargeError) IQ(org.jivesoftware.smack.packet.IQ) Test(org.junit.Test)

Aggregations

FileTooLargeError (org.jivesoftware.smackx.httpfileupload.element.FileTooLargeError)2 Test (org.junit.Test)2 IQ (org.jivesoftware.smack.packet.IQ)1