org.xmpp.packet
Class JIDCreationDomainTest

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

public class JIDCreationDomainTest
extends java.lang.Object

Tests compliance of JID with the restrictions defined in RFC-3920 for the domain 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 NODE
          A node identifier that's RFC 3920 valid.
static java.lang.String RESOURCE
          A resource identifier that's RFC 3920 valid.
 
Constructor Summary
JIDCreationDomainTest()
           
 
Method Summary
 void testMaximumSize()
          The maximum size of the domain identifier is 1023 bytes (note: bytes, not characters!).
 void testOptionality()
          Domain identifiers are a required part of a JID.
 void testOverMaximumSize()
          The maximum size of the domain 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

RESOURCE

public static final java.lang.String RESOURCE
A resource identifier that's RFC 3920 valid.

See Also:
Constant Field Values
Constructor Detail

JIDCreationDomainTest

public JIDCreationDomainTest()
Method Detail

testOptionality

public void testOptionality()
                     throws java.lang.Exception
Domain identifiers are a required part of a JID. This testcase verifies that node 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 domain 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 domain 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