org.tritonus.test.api.midi.message
Class MidiMessageTestCase

java.lang.Object
  extended by TestCase
      extended by org.tritonus.test.api.midi.message.MidiMessageTestCase

public class MidiMessageTestCase
extends TestCase

Tests for class javax.sound.midi.MidiMessage.


Constructor Summary
MidiMessageTestCase(java.lang.String strName)
           
 
Method Summary
 void testConstructor()
          Checks the constructor.
 void testGetLength()
          Checks setMessage(byte[], int).
 void testGetMessage()
          Checks getMessage().
 void testGetStatus()
          Checks getStatus().
 void testSetMessage()
          Checks setMessage(byte[], int).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MidiMessageTestCase

public MidiMessageTestCase(java.lang.String strName)
Method Detail

testConstructor

public void testConstructor()
                     throws java.lang.Exception
Checks the constructor. The test checks for four things:
  1. if the content of data follows the passed array (note that it is legal for data to be longer than the passed array).
  2. if the value of length follows the length of the passed array.
  3. if the constructor makes a copy of the passed array.
  4. if the constructor does (not) use setMessage().

Throws:
java.lang.Exception

testSetMessage

public void testSetMessage()
                    throws java.lang.Exception
Checks setMessage(byte[], int). The test checks for three things:
  1. if the content of data follows the passed array (note that it is legal for data to be longer than the passed array).
  2. if the value of length follows the length of the passed array.
  3. if the method makes a copy of the passed array.

Throws:
java.lang.Exception

testGetMessage

public void testGetMessage()
                    throws java.lang.Exception
Checks getMessage(). The test checks for three things:
  1. if the returned array has the correct length.
  2. if the returned array has the correct content (note that it is legal for stored data to be longer than the returned array).
  3. if the returned array is a copy of the stored array.

Throws:
java.lang.Exception

testGetStatus

public void testGetStatus()
                   throws java.lang.Exception
Checks getStatus(). The test checks if the returned status byte is correct.

Throws:
java.lang.Exception

testGetLength

public void testGetLength()
                   throws java.lang.Exception
Checks setMessage(byte[], int). The test checks if the returned length is correct.

Throws:
java.lang.Exception