org.jivesoftware.smack.test
Class SmackTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jivesoftware.smack.test.SmackTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
AdHocCommandDiscoTest, ChatTest, CompressionTest, FileTransferTest, FloodTest, FormTest, GroupChatInvitationTest, InBandBytestreamTest, IQTest, LastActivityManagerTest, LoginTest, MessageEventManagerTest, MessageEventTest, MessageTest, MultipleRecipientManagerTest, MultiUserChatCreationTest, MultiUserChatTest, OfflineMessageManagerTest, PacketReaderTest, PresenceTest, PrivacyProviderTest, PrivacyTest, PubSubTestCase, ReconnectionTest, RosterExchangeManagerTest, RosterExchangeTest, RosterListenerTest, RosterSmackTest, ServiceDiscoveryManagerTest, SharedGroupsTest, Socks5ByteStreamTest, TestEvents, VCardTest, VersionTest, XHTMLExtensionTest, XHTMLManagerTest, XMPPErrorTest

public abstract class SmackTestCase
extends junit.framework.TestCase

Base class for all the test cases which provides a pre-configured execution context. This means that any test case that subclassifies this base class will have access to a pool of connections and to the user of each connection. The maximum number of connections in the pool can be controlled by the message getMaxConnections() which every subclass must implement.

This base class defines a default execution context (i.e. host, port, chat domain and muc domain) which can be found in the file "config/test-case.xml". However, each subclass could redefine the default configuration by providing its own configuration file (if desired). The name of the configuration file must be of the form .xml (e.g. RosterTest.xml). The file must be placed in the folder "config". This folder is where the default configuration file is being held.

Author:
Gaston Dombiak

Constructor Summary
SmackTestCase(java.lang.String arg0)
          Constructor for SmackTestCase.
 
Method Summary
static void assertEquals(java.lang.String message, byte[] byteArray1, byte[] byteArray2)
          Compares two contents of two byte arrays to make sure that they are equal
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, run, run, runBare, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SmackTestCase

public SmackTestCase(java.lang.String arg0)
Constructor for SmackTestCase.

Parameters:
arg0 - arg for SmackTestCase
Method Detail

assertEquals

public static void assertEquals(java.lang.String message,
                                byte[] byteArray1,
                                byte[] byteArray2)
Compares two contents of two byte arrays to make sure that they are equal

Parameters:
message - The message to show in the case of failure
byteArray1 - The first byte array.
byteArray2 - The second byte array.