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

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

public final class ConfigFilesTest
extends junit.framework.TestCase

Simple tests of access/handling of local and other configuration data.


Field Summary
private static java.util.Random rnd
          OK pseudo-random source.
 
Constructor Summary
ConfigFilesTest(java.lang.String name)
           
 
Method Summary
private static TrailData _parseTrailTestAsString(java.lang.String trailText)
          Parse trail text supplied as (7-bit ASCII) String; never null.
 void testAuthDB()
          Test access to author database in GenProps.
static void testClassifiedAdFiltering()
          Test classified ad filtering.
 void testConfigFileAccess()
          Test that we can find some of the principal files.
 void testGen()
          Test access to generic key/value pairs in GenProps.
 void testGPHostMatching()
          Test access to hostname matching in GenProps.
 void testLoadOfExhibitData()
          Ensure that we can load the exhibits and meta data from the filesystem.
static void testPowerStateChecking()
          Test checking of power-state.
static void testTrailDataParsing()
          Test trail data parsing.
static void testZIPHandling()
          Test handling of ZIP-file data in/for exhibits.
 
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

rnd

private static final java.util.Random rnd
OK pseudo-random source.

Constructor Detail

ConfigFilesTest

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

testConfigFileAccess

public void testConfigFileAccess()
Test that we can find some of the principal files. We may also check that we can parse/use them.

We skip these tests if we do not have full/normal access to the filesystem.


testGPHostMatching

public void testGPHostMatching()
                        throws java.lang.Exception
Test access to hostname matching in GenProps. This checks for some data that we know to be there.

Throws:
java.lang.Exception

testAuthDB

public void testAuthDB()
                throws java.lang.Exception
Test access to author database in GenProps. This checks for some data that we know to be there.

Throws:
java.lang.Exception

testGen

public void testGen()
             throws java.lang.Exception
Test access to generic key/value pairs in GenProps. This checks for some data that we know to be there.

Throws:
java.lang.Exception

testLoadOfExhibitData

public void testLoadOfExhibitData()
                           throws java.lang.Exception
Ensure that we can load the exhibits and meta data from the filesystem. This uses the ExhibitDataFileSource.

We skip these tests if we do not have full/normal access to the filesystem.

Throws:
java.lang.Exception

testClassifiedAdFiltering

public static void testClassifiedAdFiltering()
Test classified ad filtering.


testTrailDataParsing

public static void testTrailDataParsing()
                                 throws java.lang.Exception
Test trail data parsing.

Throws:
java.lang.Exception

_parseTrailTestAsString

private static TrailData _parseTrailTestAsString(java.lang.String trailText)
                                          throws java.io.IOException
Parse trail text supplied as (7-bit ASCII) String; never null.

Parameters:
trailText - 7-bit-ASCII trail text; never null
Throws:
java.io.IOException

testZIPHandling

public static void testZIPHandling()
                            throws java.lang.Exception
Test handling of ZIP-file data in/for exhibits.

Throws:
java.lang.Exception

testPowerStateChecking

public static void testPowerStateChecking()
Test checking of power-state. Mainly to ensure that nothing crashes nor hangs.


DHD Multimedia Gallery V1.53.0

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