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

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

public final class WebUtilsTest
extends junit.framework.TestCase

Tests of WAR utility routines, mainly from the WebUtils class.


Constructor Summary
WebUtilsTest(java.lang.String name)
           
 
Method Summary
 void testMinimalUniqueENTitlePrefix()
          Test of generation of short exhibit name prefix for titles.
static void testSimple_sanitiseForXML()
          Simple tests of WebUtils.sanitiseForXML().
 void testSimpleSimilarExhibitFinder()
          Tests of SimpleSimilarExhibitFinder class.
static void testUABotNameMatching()
          Test bot/spider matching from UA name.
 
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
 

Constructor Detail

WebUtilsTest

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

testSimpleSimilarExhibitFinder

public void testSimpleSimilarExhibitFinder()
Tests of SimpleSimilarExhibitFinder class. This class is meant as the fast way to find some similar exhibits when the system is too busy for a full search to be practical.

The results of this simple search must be sane, if not always wonderful.


testMinimalUniqueENTitlePrefix

public void testMinimalUniqueENTitlePrefix()
Test of generation of short exhibit name prefix for titles. The prefixes generated must always be valid non-zero-length whole-word prefixes of the file components of the exhibit names selected, that make sense ti a human reader, but need not be totally perfect.


testSimple_sanitiseForXML

public static final void testSimple_sanitiseForXML()
Simple tests of WebUtils.sanitiseForXML(). This tests for robust behaviour of this routine with and without special handling of i18n marked-up text.


testUABotNameMatching

public static void testUABotNameMatching()
Test bot/spider matching from UA name.


DHD Multimedia Gallery V1.57.21

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