org.apache.commons.resources.impl
Class ResourcesBaseMethodTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.resources.impl.ResourcesBaseMethodTestCase
All Implemented Interfaces:
junit.framework.Test

public class ResourcesBaseMethodTestCase
extends junit.framework.TestCase

Unit tests for ResourceBase which checks that the standard content retrieval methods all work inter-changeably.

For example if the getObject() method retrieves an InputStream the getReader() method converts the InputStream to a Reader.


Field Summary
protected  org.apache.commons.resources.Resources resources
           
 
Constructor Summary
ResourcesBaseMethodTestCase(String name)
           
 
Method Summary
 void setUp()
           
static junit.framework.Test suite()
           
 void tearDown()
           
 void testByteArray()
          Test a Resources implementation whose getObject() method returns a byte array.
 void testObject()
          Test a Resources implementation whose getObject() method returns an Object that is not a String/Reader/InputStream/byte[].
 void testReader()
          Test a Resources implementation whose getObject() method returns a Reader.
 void testStream()
          Test a Resources implementation whose getObject() method returns an InputStream.
 void testString()
          Test a Resources implementation whose getObject() method returns a String.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

resources

protected org.apache.commons.resources.Resources resources
Constructor Detail

ResourcesBaseMethodTestCase

public ResourcesBaseMethodTestCase(String name)
Method Detail

setUp

public void setUp()
           throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

suite

public static junit.framework.Test suite()

tearDown

public void tearDown()
Overrides:
tearDown in class junit.framework.TestCase

testReader

public void testReader()
                throws Exception
Test a Resources implementation whose getObject() method returns a Reader.

Throws:
Exception

testStream

public void testStream()
                throws Exception
Test a Resources implementation whose getObject() method returns an InputStream.

Throws:
Exception

testString

public void testString()
                throws Exception
Test a Resources implementation whose getObject() method returns a String.

Throws:
Exception

testByteArray

public void testByteArray()
                   throws Exception
Test a Resources implementation whose getObject() method returns a byte array.

Throws:
Exception

testObject

public void testObject()
                throws Exception
Test a Resources implementation whose getObject() method returns an Object that is not a String/Reader/InputStream/byte[].

Throws:
Exception


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.