org.xmpp.packet
Class JIDCreationResourceTest

java.lang.Object
  extended by org.xmpp.packet.JIDCreationResourceTest

public class JIDCreationResourceTest
extends java.lang.Object

Tests compliance of JID with the restrictions defined in RFC-3920 for the resource identifier.

Author:
Guus der Kinderen, guus.der.kinderen@gmail.com
See Also:
RFC 3920 - Extensible Messaging and Presence Protocol (XMPP): Core

Field Summary
static java.lang.String DOMAIN
          A domain identifier that's RFC 3920 valid.
static java.lang.String NODE
          A node identifier that's RFC 3920 valid.
 
Constructor Summary
JIDCreationResourceTest()
           
 
Method Summary
 void testMaximumSize()
          The maximum size of the resource identifier is 1023 bytes (note: bytes, not characters!).
 void testOptionality()
          Resource identifiers are an optional part of a JID.
 void testOverMaximumSize()
          The maximum size of the resource identifier is 1023 bytes (note: bytes, not characters!).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NODE

public static final java.lang.String NODE
A node identifier that's RFC 3920 valid.

See Also:
Constant Field Values

DOMAIN

public static final java.lang.String DOMAIN
A domain identifier that's RFC 3920 valid.

See Also:
Constant Field Values
Constructor Detail

JIDCreationResourceTest

public JIDCreationResourceTest()
Method Detail

testOptionality

public void testOptionality()
                     throws java.lang.Exception
Resource identifiers are an optional part of a JID. This testcase verifies that resource identifiers can be left out of the creation of a JID.

Throws:
java.lang.Exception

testMaximumSize

public void testMaximumSize()
                     throws java.lang.Exception
The maximum size of the resource identifier is 1023 bytes (note: bytes, not characters!). This test verifies that using as much characters as possible without crossing the 1023 byte boundry, will not cause a problem.

Throws:
java.lang.Exception

testOverMaximumSize

public void testOverMaximumSize()
                         throws java.lang.Exception
The maximum size of the resource identifier is 1023 bytes (note: bytes, not characters!). This test verifies that using more bytes will cause an exception to be thrown.

Throws:
java.lang.Exception