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

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

public final class ExhibitFilterTest
extends junit.framework.TestCase

Test of filtering of exhibits (eg for search page). Tests that the filters behave as expected.


Field Summary
private  AllExhibitProperties aep
           
private static java.lang.String EX_SMALL_ANON_HTXT_1998
          A small single-word HTML fragment by ANON from the dawn of timeS (1998).
private static java.lang.String EX_SMALL_DHD_GIF_2WOLD
          A small single-word GIF by DHD a fortnight old.
private static java.lang.String EX_SMALL_DHD_JPEG_NOW
          A small single-word-name JPEG by DHD with timestamp of now.
private  GenProps gp
           
private static long now
          Time this class was instantiated.
private static long year1998
          Time representing 19980101.
 
Constructor Summary
ExhibitFilterTest(java.lang.String name)
           
 
Method Summary
private static AllExhibitProperties _makeAEP(AllExhibitProperties oldAEP)
          Make our standard test AEP value.
protected  void setUp()
          Do any setup needed for the tests.
protected  void tearDown()
          Do any clearup needed after the tests.
 void testEPCMSer()
          Test that computable-mutable properties are preserved through serialisation.
 void testSearchPageJavaBean()
          Test aspects of filtering by the SearchPageJavaBean.
 void testSimpleExhibitPropsComputableMutableExhibitInspection()
          Do some tests on evaluations of newness, goodness, etc, of exhibits using ExhibitPropsComputableMutable.
 void testSimpleExhibitPropsComputableMutableGoodnessDifferentials()
          Test differentials in "goodness" induced via GenProps.
 
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

aep

private AllExhibitProperties aep

gp

private GenProps gp

EX_SMALL_DHD_JPEG_NOW

private static final java.lang.String EX_SMALL_DHD_JPEG_NOW
A small single-word-name JPEG by DHD with timestamp of now.

See Also:
Constant Field Values

EX_SMALL_DHD_GIF_2WOLD

private static final java.lang.String EX_SMALL_DHD_GIF_2WOLD
A small single-word GIF by DHD a fortnight old.

See Also:
Constant Field Values

EX_SMALL_ANON_HTXT_1998

private static final java.lang.String EX_SMALL_ANON_HTXT_1998
A small single-word HTML fragment by ANON from the dawn of timeS (1998).

See Also:
Constant Field Values

now

private static final long now
Time this class was instantiated.


year1998

private static final long year1998
Time representing 19980101.

Constructor Detail

ExhibitFilterTest

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

setUp

protected void setUp()
Do any setup needed for the tests.

Overrides:
setUp in class junit.framework.TestCase

_makeAEP

private static AllExhibitProperties _makeAEP(AllExhibitProperties oldAEP)
Make our standard test AEP value.


tearDown

protected void tearDown()
Do any clearup needed after the tests.

Overrides:
tearDown in class junit.framework.TestCase

testSimpleExhibitPropsComputableMutableExhibitInspection

public void testSimpleExhibitPropsComputableMutableExhibitInspection()
Do some tests on evaluations of newness, goodness, etc, of exhibits using ExhibitPropsComputableMutable.


testSimpleExhibitPropsComputableMutableGoodnessDifferentials

public void testSimpleExhibitPropsComputableMutableGoodnessDifferentials()
Test differentials in "goodness" induced via GenProps. Tests that the smallest possible changes in static "goodness" attributes always show up in the goodness score and overwhelm any "random" factors.

Tests firstly for author weightings.


testEPCMSer

public void testEPCMSer()
                 throws java.lang.Exception
Test that computable-mutable properties are preserved through serialisation. Note that (de)serialising the whole AEP may choose not to preserve this information as a matter of policy (to save transmission/storage space at the expense of CPU time).

Throws:
java.lang.Exception

testSearchPageJavaBean

public void testSearchPageJavaBean()
Test aspects of filtering by the SearchPageJavaBean. Depends on default data set.


DHD Multimedia Gallery V1.57.21

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