org.archive.util
Class PaddingStringBufferTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.archive.util.PaddingStringBufferTest
All Implemented Interfaces:
junit.framework.Test

public class PaddingStringBufferTest
extends junit.framework.TestCase

JUnit test suite for PaddingStringBuffer

Version:
$Id: PaddingStringBufferTest.java,v 1.4 2004/02/18 00:11:36 stack-sf Exp $
Author:
James Casey

Constructor Summary
PaddingStringBufferTest(java.lang.String testName)
          Create a new PaddingStringBufferTest object
 
Method Summary
static void main(java.lang.String[] argv)
          run all the tests for PaddingStringBufferTest
 void setUp()
           
static junit.framework.Test suite()
          return the suite of tests for PaddingStringBufferTest
 void testAppendInt()
          check that append(int) works
 void testAppendLong()
          check that append(long) works
 void testAppendString()
          test that append(String) works correctly
 void testNewline()
          test the newline()
 void testPadTo()
          first check that padTo works ok, since all depends on it
 void testRaAppend()
          test the raAppend(String) works in the simple cases
 void testRaAppendInt()
          check that raAppend(int) works
 void testRaAppendLong()
          check that raAppend(long) works
 void testRaAppendWithExactLengthString()
          check it all works with the length == the length of the string
 void testRaAppendWithTooLongString()
          check what happens when we right append, but the string is longer than the space
 void testReset()
          check the reset method clears the buffer
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PaddingStringBufferTest

public PaddingStringBufferTest(java.lang.String testName)
Create a new PaddingStringBufferTest object

Parameters:
testName - the name of the test
Method Detail

main

public static void main(java.lang.String[] argv)
run all the tests for PaddingStringBufferTest

Parameters:
argv - the command line arguments

suite

public static junit.framework.Test suite()
return the suite of tests for PaddingStringBufferTest

Returns:
the suite of test

setUp

public void setUp()

testPadTo

public void testPadTo()
first check that padTo works ok, since all depends on it


testAppendString

public void testAppendString()
test that append(String) works correctly


testReset

public void testReset()
check the reset method clears the buffer


testRaAppend

public void testRaAppend()
test the raAppend(String) works in the simple cases


testNewline

public void testNewline()
test the newline()


testRaAppendWithTooLongString

public void testRaAppendWithTooLongString()
check what happens when we right append, but the string is longer than the space


testRaAppendWithExactLengthString

public void testRaAppendWithExactLengthString()
check it all works with the length == the length of the string


testAppendInt

public void testAppendInt()
check that append(int) works


testRaAppendInt

public void testRaAppendInt()
check that raAppend(int) works


testAppendLong

public void testAppendLong()
check that append(long) works


testRaAppendLong

public void testRaAppendLong()
check that raAppend(long) works



Copyright © 2003-2005 Internet Archive. All Rights Reserved.