com.ls.util.bytes
Class Base64TestCase

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--com.ls.util.bytes.Base64TestCase
All Implemented Interfaces:
junit.framework.Test

public class Base64TestCase
extends junit.framework.TestCase

TestCase for Base64

Version:
$Revision: 1.1 $
Author:
Last modified by $Author: RKatzenberger $

Constructor Summary
Base64TestCase(String name)
          Constructor which gives a name to the test case object.
 
Method Summary
protected  void setUp()
          Sets up the test fixture before every call to a test method.
protected  void tearDown()
          Tears down the test fixture after every call to a test method.
 void testBasics()
          Tests the correctness of the Base64 encoding.
 void testReversibility()
          Tests the reversibility of both the Base64 encoding and decoding.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, name, run, run, runBare, runTest, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Base64TestCase

public Base64TestCase(String name)
               throws UnsupportedEncodingException
Constructor which gives a name to the test case object.
Parameters:
name - The name of the test case object
Throws:
UnsupportedEncodingException - If some test string cannot be converted to UTF-8 encoded bytes due to platform limitations.
Method Detail

setUp

protected void setUp()
Sets up the test fixture before every call to a test method.
Overrides:
setUp in class junit.framework.TestCase

tearDown

protected void tearDown()
Tears down the test fixture after every call to a test method.
Overrides:
tearDown in class junit.framework.TestCase

testBasics

public void testBasics()
Tests the correctness of the Base64 encoding.

testReversibility

public void testReversibility()
                       throws UnsupportedEncodingException
Tests the reversibility of both the Base64 encoding and decoding.
Throws:
UnsupportedEncodingException - If some test string cannot be constructed from UTF-8 encoded bytes due to platform limitations.