net.sourceforge.smile.test
Class ResponseWriterTestCase

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bynet.sourceforge.smile.test.AbstractTest
              extended bynet.sourceforge.smile.test.ResponseWriterTestCase
All Implemented Interfaces:
junit.framework.Test

public class ResponseWriterTestCase
extends AbstractTest

Test suite that will check the specifications with the implemntation of the ResponseWriter class.


Constructor Summary
ResponseWriterTestCase()
           
 
Method Summary
 void testBasicOps()
          This test case will check all the basic operations available on the ResponseStream
 void testElementAutoClose()
          Check taht all required method actually close the started element tag when called
 void testElementMultipleAttributes()
          Verify multiple attributes
 void testExceptionOnAttributeOutsideElement()
          Checks that writing an attribute throws an exception, when outside of an element tag
 void testIOExceptionAfterClose()
          Check to see if all character writing operations throw an IOException after closing the stream
 void testNullPointerExceptions()
          Test to verify that all required NullPointer exceptions are throws as specified by the JavaDOcs
 void testWriteTextOutOfBounds()
          Check that an IndexOutOfBoundsException is generated start or end position is outside of the array specified
 
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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResponseWriterTestCase

public ResponseWriterTestCase()
Method Detail

testBasicOps

public void testBasicOps()
                  throws java.lang.Exception
This test case will check all the basic operations available on the ResponseStream

Throws:
java.lang.Exception

testIOExceptionAfterClose

public void testIOExceptionAfterClose()
                               throws java.lang.Exception
Check to see if all character writing operations throw an IOException after closing the stream

Throws:
java.lang.Exception

testElementMultipleAttributes

public void testElementMultipleAttributes()
                                   throws java.lang.Exception
Verify multiple attributes

Throws:
java.lang.Exception

testElementAutoClose

public void testElementAutoClose()
                          throws java.lang.Exception
Check taht all required method actually close the started element tag when called

Throws:
java.lang.Exception

testExceptionOnAttributeOutsideElement

public void testExceptionOnAttributeOutsideElement()
                                            throws java.lang.Exception
Checks that writing an attribute throws an exception, when outside of an element tag

Throws:
java.lang.Exception

testNullPointerExceptions

public void testNullPointerExceptions()
                               throws java.lang.Exception
Test to verify that all required NullPointer exceptions are throws as specified by the JavaDOcs

Throws:
java.lang.Exception

testWriteTextOutOfBounds

public void testWriteTextOutOfBounds()
                              throws java.lang.Exception
Check that an IndexOutOfBoundsException is generated start or end position is outside of the array specified

Throws:
java.lang.Exception