Save This Page
Home » cactus-1.8.0-src » org.apache.cactus.integration.ant.deployment.webapp » [javadoc | source]
org.apache.cactus.integration.ant.deployment.webapp
public final class: TestWebXml [javadoc | source]
java.lang.Object
   junit.framework.TestCase
      org.apache.cactus.integration.ant.deployment.webapp.TestWebXml
Unit tests for WebXml .
Method from org.apache.cactus.integration.ant.deployment.webapp.TestWebXml Summary:
createContextParamElement,   createFilterElement,   createServletElement,   setUp,   testAddContextParamToDocumentWithAnotherContextParam,   testAddContextParamToDocumentWithTheSameContextParam,   testAddContextParamToEmptyDocument,   testAddFilterToDocumentWithAnotherFilter,   testAddFilterToDocumentWithTheSameFilter,   testAddFilterToEmptyDocument,   testAddFilterWithNameAndClass,   testAddMultipleFilterInitParams,   testAddMultipleServletInitParams,   testAddOneFilterInitParam,   testAddOneServletInitParam,   testAddSecurityConstraint,   testAddSecurityConstraintWithRoles,   testAddServletRunAsRole,   testAddServletToDocumentWithAnotherServlet,   testAddServletToDocumentWithTheSameServlet,   testAddServletToEmptyDocument,   testAddServletWithNameAndClass,   testAddServletWithNameAndJspFile,   testConstructionWithNullDocument,   testElementOrderFilterBeforeServlet,   testElementOrderFilterBeforeServletWithComment,   testElementOrderServletAfterFilter,   testElementOrderServletAfterFilterWithComment,   testGetFilterElementWithOneFilter,   testGetFilterMappingsWithFilter,   testGetFilterMappingsWithMultipleMappings,   testGetFilterMappingsWithOneMapping,   testGetFilterNames,   testGetFilterNamesForClassWithMultipleFilters,   testGetFilterNamesForClassWithSingleFilter,   testGetLoginConfig,   testGetLoginConfigAuthMethod,   testGetLoginConfigEmpty,   testGetMutlipleSecurityConstraints,   testGetMutlipleSecurityRoles,   testGetServletElementWithOneServlet,   testGetServletMappingsWithMultipleMappings,   testGetServletMappingsWithOneMapping,   testGetServletNames,   testGetServletNamesForClassWithMultipleServlets,   testGetServletNamesForClassWithSingleServlet,   testGetServletNamesForJspFileWithMultipleServlets,   testGetServletNamesForJspFileWithSingleServlet,   testGetServletRunAsRole,   testGetSingleSecurityConstraint,   testGetSingleSecurityRole,   testGetVersion22,   testGetVersion23,   testGetVersionUnknown,   testGetVersionWithoutDoctype,   testHasFilterWithMultipleFilters,   testHasFilterWithNullName,   testHasFilterWithOneFilter,   testHasLoginConfig,   testHasLoginConfigEmpty,   testHasSecurityConstraintEmpty,   testHasSecurityRoleEmpty,   testHasServletWithMultipleServlets,   testHasServletWithNullName,   testHasServletWithOneServlet,   testSetLoginConfigAdding,   testSetLoginConfigReplacing
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cactus.integration.ant.deployment.webapp.TestWebXml Detail:
 public Element createContextParamElement(Document theDocument,
    String theParamName,
    String theParamValue) 
    Create a context-param element containing the specified text in the child elements.
 public Element createFilterElement(Document theDocument,
    String theFilterName,
    String theFilterClass) 
    Create a filter element containing the specified text in the child elements.
 public Element createServletElement(Document theDocument,
    String theServletName,
    String theServletClass) 
    Create a servlet element containing the specified text in the child elements.
 public  void setUp() throws ParserConfigurationException 
 public  void testAddContextParamToDocumentWithAnotherContextParam() throws Exception 
    Tests whether a single context param is correctly inserted into a descriptor that already contains an other context param definition.
 public  void testAddContextParamToDocumentWithTheSameContextParam() throws Exception 
    Tests whether trying to add a context param to a descriptor that already contains a context param definition with the same name results in an exception.
 public  void testAddContextParamToEmptyDocument() throws Exception 
    Tests whether a single context-param is correctly inserted into an empty descriptor.
 public  void testAddFilterToDocumentWithAnotherFilter() throws Exception 
    Tests whether a single filter is correctly inserted into a descriptor that already contains an other filter definition.
 public  void testAddFilterToDocumentWithTheSameFilter() throws Exception 
    Tests whether trying to add a filter to a descriptor that already contains a filter definition with the same name results in a exception.
 public  void testAddFilterToEmptyDocument() throws Exception 
    Tests whether a single filter is correctly inserted into an empty descriptor.
 public  void testAddFilterWithNameAndClass() throws Exception 
    Tests whether a single filter can be added using the method that takes a string for the filter name and a string for the filter class.
 public  void testAddMultipleFilterInitParams() throws Exception 
    Tests whether multiple initialization parameter can be added to a filter definition.
 public  void testAddMultipleServletInitParams() throws Exception 
    Tests whether multiple initialization parameters are correctly added to an existing servlet definition.
 public  void testAddOneFilterInitParam() throws Exception 
    Tests whether a single initialization parameter can be added to a filter definition.
 public  void testAddOneServletInitParam() throws Exception 
    Tests whether a single initialization parameter is correctly added to an existing servlet definition.
 public  void testAddSecurityConstraint() throws Exception 
    Tests whether a security-constraint with no roles is successfully added to an empty descriptor.
 public  void testAddSecurityConstraintWithRoles() throws Exception 
    Tests whether a security-constraint with two roles is successfully added to an empty descriptor.
 public  void testAddServletRunAsRole() throws Exception 
    Tests that a run-as role-name can be added to a servlet
 public  void testAddServletToDocumentWithAnotherServlet() throws Exception 
    Tests whether a single servlet can be added to a descriptor already containing an other servlet.
 public  void testAddServletToDocumentWithTheSameServlet() throws Exception 
    Tests whether trying to add a servlet to a descriptor that already contains a servlet with the same name results in an exception.
 public  void testAddServletToEmptyDocument() throws Exception 
    Tests whether a single servlet can be added to an empty descriptor.
 public  void testAddServletWithNameAndClass() throws Exception 
    Tests whether a single servlet can be added using the method that takes a string for the servlet name and a string for the servlet class.
 public  void testAddServletWithNameAndJspFile() throws Exception 
    Tests whether a single servlet can be added using the method that takes a string for the servlet name and a string for the JSP file.
 public  void testConstructionWithNullDocument() throws Exception 
    Tests whether the construction of a WebXml object with a null parameter for the DOM document throws a NullPointerException.
 public  void testElementOrderFilterBeforeServlet() throws Exception 
    Tests whether a filter is inserted before a servlet element.
 public  void testElementOrderFilterBeforeServletWithComment() throws Exception 
    Tests whether a filter is inserted before the comment node preceding a servlet definition.
 public  void testElementOrderServletAfterFilter() throws Exception 
    Tests whether a servlet is inserted after a filter.
 public  void testElementOrderServletAfterFilterWithComment() throws Exception 
    Tests whether a servlet is inserted after a filter that is preceded by a comment node.
 public  void testGetFilterElementWithOneFilter() throws Exception 
    Tests whether a DOM element representing a single filter definition can be correctly retrieved from a descriptor containing only that filter.
 public  void testGetFilterMappingsWithFilter() throws Exception 
    Tests whether a filter-mapping is correctly retrieved from a descriptor.
 public  void testGetFilterMappingsWithMultipleMappings() throws Exception 
    Tests whether multiple filter-mappings are correctly retrieved from a descriptor.
 public  void testGetFilterMappingsWithOneMapping() throws Exception 
    Tests whether a filter-mapping is correctly retrieved from a descriptor.
 public  void testGetFilterNames() throws Exception 
    Tests whether the filter names are retrieved in the expected order.
 public  void testGetFilterNamesForClassWithMultipleFilters() throws Exception 
    Tests whether a retrieving the filter names by the name of the class implementing the filter works correctly for a descriptor with multiple filter definitions.
 public  void testGetFilterNamesForClassWithSingleFilter() throws Exception 
    Tests whether a retrieving a filter name by the name of the class implementing the filter works correctly for a descriptor with a single filter definition.
 public  void testGetLoginConfig() throws Exception 
    Tests whether the login-config element can be correctly retrieved.
 public  void testGetLoginConfigAuthMethod() throws Exception 
    Tests retrieving the authentication method from a descriptor.
 public  void testGetLoginConfigEmpty() throws Exception 
    Tests whether retrieving the login-config from an empty descriptor returns null.
 public  void testGetMutlipleSecurityConstraints() throws Exception 
    Tests whether multiple security-constraint elements are returned in the expected order.
 public  void testGetMutlipleSecurityRoles() throws Exception 
    Tests whether multiple security-role elements are correctly retrieved in the expected order.
 public  void testGetServletElementWithOneServlet() throws Exception 
    Tests whether a servlet element is correctly retrieved from a descriptor containing only one servlet definition.
 public  void testGetServletMappingsWithMultipleMappings() throws Exception 
    Tests whether multiple servlet mappings are correctly retrieved from a descriptor.
 public  void testGetServletMappingsWithOneMapping() throws Exception 
    Tests whether a single serrvlet-mapping is correctly retrieved from a descriptor.
 public  void testGetServletNames() throws Exception 
    Tests whether the names of the servlets defined in a descriptor are correctly returned in the expected order.
 public  void testGetServletNamesForClassWithMultipleServlets() throws Exception 
    Tests whether a retrieving the servlet names by the name of the class implementing the servlet works correctly for a descriptor with multiple servlet definitions.
 public  void testGetServletNamesForClassWithSingleServlet() throws Exception 
    Tests whether a retrieving a servlet name by the name of the class implementing the servlet works correctly for a descriptor with a single servlet definition.
 public  void testGetServletNamesForJspFileWithMultipleServlets() throws Exception 
    Tests whether a retrieving the servlet names by the path of the JSP file implementing the servlet works correctly for a descriptor with multiple servlet definitions.
 public  void testGetServletNamesForJspFileWithSingleServlet() throws Exception 
    Tests whether a retrieving a servlet name by the path of the JSP file implementing the servlet works correctly for a descriptor with a single servlet definition.
 public  void testGetServletRunAsRole() throws Exception 
    Tests that the a servlets run-as role-name can be extracted
 public  void testGetSingleSecurityConstraint() throws Exception 
    Tests whether a single security-constraint element in the descriptor is correctly retrieved.
 public  void testGetSingleSecurityRole() throws Exception 
    Tests whether a single security-role element is correctly retrieved.
 public  void testGetVersion22() throws Exception 
    Tests whether a servlet API version 2.2 descriptor is correctly detected.
 public  void testGetVersion23() throws Exception 
    Tests whether a servlet API version 2.3 descriptor is correctly detected.
 public  void testGetVersionUnknown() throws Exception 
    Tests whether WebXml#getVersion returns null when the public ID of the DOCTYPE is not recognized.
 public  void testGetVersionWithoutDoctype() throws Exception 
    Tests whether WebXml#getVersion returns null when the DOCTYPE is missing.
 public  void testHasFilterWithMultipleFilters() throws Exception 
    Tests whether WebXml.hasFilter returns the correct values for a descriptor containing multiple filter definitions.
 public  void testHasFilterWithNullName() throws Exception 
    Tests whether calling WebXml.hasFilter with null as filter name parameter results in a NullPointerException being thrown.
 public  void testHasFilterWithOneFilter() throws Exception 
    Tests whether WebXml.hasFilter returns the correct value for a descriptor containing one filter definition.
 public  void testHasLoginConfig() throws Exception 
    Tests whether checking a descriptor with a login configuration for a login configuration results in true.
 public  void testHasLoginConfigEmpty() throws Exception 
    Tests whether checking an empty descriptor for a login configuration results in false.
 public  void testHasSecurityConstraintEmpty() throws Exception 
    Tests whether checking an empty descriptor for some security constraint results in false.
 public  void testHasSecurityRoleEmpty() throws Exception 
    Tests whether checking an empty descriptor for some security roles results in false.
 public  void testHasServletWithMultipleServlets() throws Exception 
    Tests whether WebXml#hasServlet reports the correct values for a descriptor containing multiple servlet definitions.
 public  void testHasServletWithNullName() throws Exception 
    Tests whether calling WebXml#hasServlet with a null parameter as servlet name throws a NullPointerException.
 public  void testHasServletWithOneServlet() throws Exception 
    Tests whether WebXml#hasServlet reports the correct values for a descriptor containing a single servlet definition.
 public  void testSetLoginConfigAdding() throws Exception 
    Tests retrieving the authentication method from a descriptor.
 public  void testSetLoginConfigReplacing() throws Exception 
    Tests retrieving the authentication method from a descriptor.