org.hd.d.pg2k.test.dev
Class PaginationBeanTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.hd.d.pg2k.test.dev.PaginationBeanTest
All Implemented Interfaces:
junit.framework.Test

public final class PaginationBeanTest
extends junit.framework.TestCase

Tests the variants and derivatives of PaginationBeanNumeric. These beans can be used stand-alone (outside a JSP page) at least in part, so we can test the core algorithms.


Field Summary
private static boolean MUST_USE_ALL_AVAILABLE_BUTTONS
          If true, we are very strict and insist that we must use all available buttons.
 
Constructor Summary
PaginationBeanTest()
           
 
Method Summary
private static void testLabels(PaginationBeanBase pbb)
          Test some characteristics of the labels obtained from the bean.
 void testPaginationBeanBase()
          Performs test of the base bean.
private static void testPBContract(PaginationBeanBase pbb)
          Do some tests of generic contract that should work on any PaginationBaseBean or sub-class.
 void testTreeFilterBean()
          Test the PaginationBeanTree.
 void testTreeFilterBeanOnFullDataSet()
          Test the PaginationBeanTree on a realistic data set from a recent AEP.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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
 

Field Detail

MUST_USE_ALL_AVAILABLE_BUTTONS

private static final boolean MUST_USE_ALL_AVAILABLE_BUTTONS
If true, we are very strict and insist that we must use all available buttons. This is to give users maximum number of useful choices.

See Also:
Constant Field Values
Constructor Detail

PaginationBeanTest

public PaginationBeanTest()
Method Detail

testPaginationBeanBase

public void testPaginationBeanBase()
Performs test of the base bean. This ensures that the basic underlying algorithms are correct.


testTreeFilterBean

public void testTreeFilterBean()
Test the PaginationBeanTree.


testTreeFilterBeanOnFullDataSet

public void testTreeFilterBeanOnFullDataSet()
                                     throws java.lang.Exception
Test the PaginationBeanTree on a realistic data set from a recent AEP. This is mainly a test that nothing breaks, and a sneaky performance test.

Throws:
java.lang.Exception

testPBContract

private static void testPBContract(PaginationBeanBase pbb)
Do some tests of generic contract that should work on any PaginationBaseBean or sub-class. The bean must be passed in already set up.

This may alter some or all of the bean state.


testLabels

private static void testLabels(PaginationBeanBase pbb)
Test some characteristics of the labels obtained from the bean.


DHD Multimedia Gallery V1.57.21

Copyright (c) 1996-2011, Damon Hart-Davis. All rights reserved.