Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.webapps.test
Class LazyEBListTest  view LazyEBListTest download LazyEBListTest.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bycom.RuntimeCollective.webapps.RuntimeTestCase
              extended bycom.RuntimeCollective.webapps.test.WebappsTestCase
                  extended bycom.RuntimeCollective.webapps.test.LazyEBListTest
All Implemented Interfaces:
junit.framework.Test

public class LazyEBListTest
extends WebappsTestCase

Tests correct behaviour on all methods of LazyEBList.

These tests could be extended to check that the LazyEBList fails correctly when given bad input.


Field Summary
protected  com.RuntimeCollective.webapps.Cache cache
           
protected  java.lang.String ebClassName
          Classname of the EntityBeans returned by getEBList.
protected  com.RuntimeCollective.webapps.EntityBeanStore ebs
           
protected  java.util.List ids
           
 
Fields inherited from class com.RuntimeCollective.webapps.test.WebappsTestCase
DEFAULT_STORE_CLASS
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
LazyEBListTest(java.lang.String name)
           
 
Method Summary
 void checkEmptyCache()
          Returns true iff the cache is empty
protected  com.RuntimeCollective.webapps.Cache getCacheForEB()
          Get the EBS cache for the EBs we're playing with (Users, by convention)
protected  java.util.List getEBList()
          Get a List of EntityBean Integer ids to play with (Users, by convention)
protected  java.util.List getLazyList()
          Get the LazyList, clearing the cache before
protected  void ivSetup()
           
protected  void ivTearDown()
           
static void main(java.lang.String[] args)
          RuntimeTestCase is a basic TestCase, which sets up 2 database in RuntimeDataSource and RuntimeParameters.
protected  void registerCustomBeans()
           
protected  void setUp()
          This has been copied over from the theseus test cases, and will be updated to use the RuntimeTestCase init routines shortly
protected  void tearDown()
          Tears down the fixture, for example, close a network connection.
 void testAdd()
           
 void testAddAll()
           
 void testAddWithPosition()
           
 void testClear()
           
 void testContains()
           
 void testContainsAll()
           
 void testEBSize()
           
 void testEquals()
           
 void testGet()
           
 void testHashCode()
           
 void testIndexOf()
           
 void testIsEmpty()
           
 void testIterator()
           
 void testLastIndexOf()
           
 void testListIterator()
           
 void testRemoveAll()
           
 void testRemoveById()
           
 void testRemoveByObject()
           
 void testRetainAll()
           
 void testSet()
           
 void testSize()
           
 void testSubList()
           
 void testSubListClear()
           
 void testToArray()
           
 
Methods inherited from class com.RuntimeCollective.webapps.test.WebappsTestCase
checkBeanStore, getBeanNames, getNameId, getStoreClassForBeanName, initialiseBeanStore, initMailSession, initUserGroups, printBeanStoreClasses, registerBeanClass, registerBeanClass, resetBeanRegister, testCheckEntityBeanStoreValid
 
Methods inherited from class com.RuntimeCollective.webapps.RuntimeTestCase
LogTestSection, setupRuntime
 
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

ebs

protected com.RuntimeCollective.webapps.EntityBeanStore ebs

cache

protected com.RuntimeCollective.webapps.Cache cache

ids

protected java.util.List ids

ebClassName

protected java.lang.String ebClassName
Classname of the EntityBeans returned by getEBList.

Constructor Detail

LazyEBListTest

public LazyEBListTest(java.lang.String name)
Method Detail

setUp

protected void setUp()
Description copied from class: WebappsTestCase
This has been copied over from the theseus test cases, and will be updated to use the RuntimeTestCase init routines shortly

Overrides:
setUp in class WebappsTestCase

tearDown

protected void tearDown()
Description copied from class: junit.framework.TestCase
Tears down the fixture, for example, close a network connection. This method is called after a test is executed.

Overrides:
tearDown in class WebappsTestCase

ivSetup

protected void ivSetup()

ivTearDown

protected void ivTearDown()

registerCustomBeans

protected void registerCustomBeans()

getEBList

protected java.util.List getEBList()
                            throws java.sql.SQLException
Get a List of EntityBean Integer ids to play with (Users, by convention)


getCacheForEB

protected com.RuntimeCollective.webapps.Cache getCacheForEB()
                                                     throws java.sql.SQLException
Get the EBS cache for the EBs we're playing with (Users, by convention)


checkEmptyCache

public void checkEmptyCache()
Returns true iff the cache is empty


getLazyList

protected java.util.List getLazyList()
Get the LazyList, clearing the cache before


testEBSize

public void testEBSize()

testSize

public void testSize()

testIsEmpty

public void testIsEmpty()

testContains

public void testContains()

testToArray

public void testToArray()

testRemoveByObject

public void testRemoveByObject()

testRemoveById

public void testRemoveById()

testRemoveAll

public void testRemoveAll()

testIterator

public void testIterator()

testContainsAll

public void testContainsAll()

testAddAll

public void testAddAll()

testRetainAll

public void testRetainAll()

testClear

public void testClear()

testEquals

public void testEquals()

testHashCode

public void testHashCode()

testGet

public void testGet()

testSet

public void testSet()

testAdd

public void testAdd()

testAddWithPosition

public void testAddWithPosition()

testIndexOf

public void testIndexOf()

testLastIndexOf

public void testLastIndexOf()

testListIterator

public void testListIterator()

testSubList

public void testSubList()

testSubListClear

public void testSubListClear()

main

public static void main(java.lang.String[] args)
Description copied from class: com.RuntimeCollective.webapps.RuntimeTestCase
RuntimeTestCase is a basic TestCase, which sets up 2 database in RuntimeDataSource and RuntimeParameters. In each module, it should be extended into a ModuleTestCase. The ModuleTestCase will add module-specific RuntimeParameters, and register the required beans. Finally, each module will define one or many actual test cases, by extending ModuleTestCase. Example: - com.RuntimeCollective.content.test.ContentTestCase implements com.RuntimeCollective.webapps.RuntimeTestCase - com.RuntimeCollective.content.test.FileTest implements com.RuntimeCollective.content.test.ContentTestCase - com.RuntimeCollective.content.test.ImageTest implements com.RuntimeCollective.content.test.ContentTestCase