org.archive.crawler.settings
Class MapTypeTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.archive.util.TmpDirTestCase
              extended byorg.archive.crawler.settings.SettingsFrameworkTestCase
                  extended byorg.archive.crawler.settings.MapTypeTest
All Implemented Interfaces:
junit.framework.Test, ValueErrorHandler

public class MapTypeTest
extends SettingsFrameworkTestCase

JUnit tests for MapType

Author:
John Erik Halse

Field Summary
 
Fields inherited from class org.archive.crawler.settings.SettingsFrameworkTestCase
settingsHandler
 
Constructor Summary
MapTypeTest()
           
 
Method Summary
 void checkOrder(CrawlerSettings settings, Type[] modules, MapType map)
          Helper method for checking that elements are in a certain order after maipulating them.
protected  void setUp()
           
protected  void tearDown()
           
 void testAddRemoveSizeGlobal()
          Test different aspects of manipulating a MapType for the global settings.
 void testAddRemoveSizeHost()
          Test different aspects of manipulating a MapType for the per domain settings.
 void testGetAttribute()
           
 void testGetDefaultValue()
           
 void testGetLegalValues()
           
 void testGetValue()
           
 void testListAttributes()
           
 void testMoveElementDown()
           
 void testMoveElementUp()
           
 
Methods inherited from class org.archive.crawler.settings.SettingsFrameworkTestCase
getGlobalSettings, getMatchDomainURI, getMatchHostURI, getOrderFile, getPerDomainSettings, getPerHostSettings, getSettingsDir, getSettingsHandler, getUnMatchedURI, handleValueError
 
Methods inherited from class org.archive.util.TmpDirTestCase
cleanUpOldFiles, cleanUpOldFiles, getTmpDir
 
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
 

Constructor Detail

MapTypeTest

public MapTypeTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class SettingsFrameworkTestCase
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Overrides:
tearDown in class SettingsFrameworkTestCase
Throws:
java.lang.Exception

testAddRemoveSizeGlobal

public void testAddRemoveSizeGlobal()
                             throws javax.management.InvalidAttributeValueException,
                                    javax.management.AttributeNotFoundException,
                                    javax.management.MBeanException,
                                    javax.management.ReflectionException
Test different aspects of manipulating a MapType for the global settings.

Throws:
javax.management.InvalidAttributeValueException
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException

testAddRemoveSizeHost

public void testAddRemoveSizeHost()
                           throws javax.management.InvalidAttributeValueException,
                                  javax.management.AttributeNotFoundException,
                                  javax.management.MBeanException,
                                  javax.management.ReflectionException
Test different aspects of manipulating a MapType for the per domain settings.

Throws:
javax.management.InvalidAttributeValueException
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException

testMoveElementUp

public void testMoveElementUp()
                       throws javax.management.AttributeNotFoundException,
                              javax.management.MBeanException,
                              javax.management.ReflectionException,
                              javax.management.InvalidAttributeValueException
Throws:
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
javax.management.InvalidAttributeValueException

testMoveElementDown

public void testMoveElementDown()
                         throws javax.management.InvalidAttributeValueException,
                                javax.management.AttributeNotFoundException,
                                javax.management.MBeanException,
                                javax.management.ReflectionException
Throws:
javax.management.InvalidAttributeValueException
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException

checkOrder

public void checkOrder(CrawlerSettings settings,
                       Type[] modules,
                       MapType map)
                throws javax.management.AttributeNotFoundException,
                       javax.management.MBeanException,
                       javax.management.ReflectionException
Helper method for checking that elements are in a certain order after maipulating them.

Parameters:
settings -
modules -
map -
Throws:
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException

testGetDefaultValue

public void testGetDefaultValue()
                         throws javax.management.AttributeNotFoundException,
                                javax.management.MBeanException,
                                javax.management.ReflectionException
Throws:
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException

testGetLegalValues

public void testGetLegalValues()
                        throws javax.management.AttributeNotFoundException,
                               javax.management.MBeanException,
                               javax.management.ReflectionException
Throws:
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException

testGetValue

public void testGetValue()
                  throws javax.management.AttributeNotFoundException,
                         javax.management.MBeanException,
                         javax.management.ReflectionException
Throws:
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException

testGetAttribute

public void testGetAttribute()
                      throws javax.management.AttributeNotFoundException,
                             javax.management.MBeanException,
                             javax.management.ReflectionException,
                             javax.management.InvalidAttributeValueException
Throws:
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
javax.management.InvalidAttributeValueException

testListAttributes

public void testListAttributes()
                        throws javax.management.AttributeNotFoundException,
                               javax.management.MBeanException,
                               javax.management.ReflectionException,
                               javax.management.InvalidAttributeValueException
Throws:
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
javax.management.InvalidAttributeValueException


Copyright © 2003-2005 Internet Archive. All Rights Reserved.