createFilterElement(Document theDocument, String theFilterName, String theFilterClass) Create a filter element containing the specified text in
the child elements.
createServletElement(Document theDocument, String theServletName, String theServletClass) Create a servlet element containing the specified text in
the child elements.
testAddFilterToDocumentWithAnotherFilter() Tests whether a single filter is correctly inserted into a descriptor
that already contains an other filter definition.
public void
testAddFilterToDocumentWithTheSameFilter() Tests whether trying to add a filter to a descriptor that already
contains a filter definition with the same name results in a exception.
testAddFilterWithNameAndClass() 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.
testAddServletToDocumentWithTheSameServlet() Tests whether trying to add a servlet to a descriptor that already
contains a servlet with the same name results in an exception.
testAddServletWithNameAndClass() 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() 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() Tests whether the construction of a WebXml object with a
null parameter for the DOM document throws a
NullPointerException.
testGetFilterElementWithOneFilter() Tests whether a DOM element representing a single filter definition can
be correctly retrieved from a descriptor containing only that filter.
testGetFilterNames() Tests whether the filter names are retrieved in the expected order.
public void
testGetFilterNamesForClassWithMultipleFilters() 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() 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() Tests whether the login-config element can be correctly retrieved.
testGetServletNames() Tests whether the names of the servlets defined in a descriptor are
correctly returned in the expected order.
public void
testGetServletNamesForClassWithMultipleServlets() 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() 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() 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() 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.
Create a context-param element containing the specified
text in the child elements.
Parameters: theDocument - The DOM document Parameters: theParamName - The parameter name Parameters: theParamValue - The parameter value The created element
Create a filter element containing the specified text in
the child elements.
Parameters: theDocument - The DOM document Parameters: theFilterName - The name of the filter Parameters: theFilterClass - The name of the filter implementation class The created element
Create a servlet element containing the specified text in
the child elements.
Parameters: theDocument - The DOM document Parameters: theServletName - The name of the servlet Parameters: theServletClass - The name of the servlet implementation class The created element
public void testAddContextParamToDocumentWithAnotherContextParam() throws Exception(Code)
Tests whether a single context param is correctly inserted into a
descriptor that already contains an other context param definition.
throws: Exception - If an unexpected error occurs
public void testAddContextParamToDocumentWithTheSameContextParam() throws Exception(Code)
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.
throws: Exception - If an unexpected error occurs
testAddContextParamToEmptyDocument
public void testAddContextParamToEmptyDocument() throws Exception(Code)
Tests whether a single context-param is correctly inserted into an empty
descriptor.
throws: Exception - If an unexpected error occurs
testAddFilterToDocumentWithAnotherFilter
public void testAddFilterToDocumentWithAnotherFilter() throws Exception(Code)
Tests whether a single filter is correctly inserted into a descriptor
that already contains an other filter definition.
throws: Exception - If an unexpected error occurs
testAddFilterToDocumentWithTheSameFilter
public void testAddFilterToDocumentWithTheSameFilter() throws Exception(Code)
Tests whether trying to add a filter to a descriptor that already
contains a filter definition with the same name results in a exception.
throws: Exception - If an unexpected error occurs
testAddFilterToEmptyDocument
public void testAddFilterToEmptyDocument() throws Exception(Code)
Tests whether a single filter is correctly inserted into an empty
descriptor.
throws: Exception - If an unexpected error occurs
testAddFilterWithNameAndClass
public void testAddFilterWithNameAndClass() throws Exception(Code)
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.
throws: Exception - If an unexpected error occurs
testAddMultipleFilterInitParams
public void testAddMultipleFilterInitParams() throws Exception(Code)
Tests whether multiple initialization parameter can be added to a filter
definition.
throws: Exception - If an unexpected error occurs
testAddMultipleServletInitParams
public void testAddMultipleServletInitParams() throws Exception(Code)
Tests whether multiple initialization parameters are correctly added to
an existing servlet definition.
throws: Exception - If an unexpected error occurs
testAddOneFilterInitParam
public void testAddOneFilterInitParam() throws Exception(Code)
Tests whether a single initialization parameter can be added to a filter
definition.
throws: Exception - If an unexpected error occurs
testAddOneServletInitParam
public void testAddOneServletInitParam() throws Exception(Code)
Tests whether a single initialization parameter is correctly added to an
existing servlet definition.
throws: Exception - If an unexpected error occurs
testAddSecurityConstraint
public void testAddSecurityConstraint() throws Exception(Code)
Tests whether a security-constraint with no roles is successfully added
to an empty descriptor.
throws: Exception - If an unexpected error occurs
testAddSecurityConstraintWithRoles
public void testAddSecurityConstraintWithRoles() throws Exception(Code)
Tests whether a security-constraint with two roles is successfully added
to an empty descriptor.
throws: Exception - If an unexpected error occurs
testAddServletRunAsRole
public void testAddServletRunAsRole() throws Exception(Code)
Tests that a run-as role-name can be added to a servlet
throws: Exception - If an unexpected error occurs
testAddServletToDocumentWithAnotherServlet
public void testAddServletToDocumentWithAnotherServlet() throws Exception(Code)
Tests whether a single servlet can be added to a descriptor already
containing an other servlet.
throws: Exception - If an unexpected error occurs
testAddServletToDocumentWithTheSameServlet
public void testAddServletToDocumentWithTheSameServlet() throws Exception(Code)
Tests whether trying to add a servlet to a descriptor that already
contains a servlet with the same name results in an exception.
throws: Exception - If an unexpected error occurs
testAddServletToEmptyDocument
public void testAddServletToEmptyDocument() throws Exception(Code)
Tests whether a single servlet can be added to an empty descriptor.
throws: Exception - If an unexpected error occurs
testAddServletWithNameAndClass
public void testAddServletWithNameAndClass() throws Exception(Code)
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.
throws: Exception - If an unexpected error occurs
testAddServletWithNameAndJspFile
public void testAddServletWithNameAndJspFile() throws Exception(Code)
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.
throws: Exception - If an unexpected error occurs
testConstructionWithNullDocument
public void testConstructionWithNullDocument() throws Exception(Code)
Tests whether the construction of a WebXml object with a
null parameter for the DOM document throws a
NullPointerException.
throws: Exception - If an unexpected error occurs
testElementOrderFilterBeforeServlet
public void testElementOrderFilterBeforeServlet() throws Exception(Code)
Tests whether a filter is inserted before a servlet element.
throws: Exception - If an unexpected error occurs
testElementOrderFilterBeforeServletWithComment
public void testElementOrderFilterBeforeServletWithComment() throws Exception(Code)
Tests whether a filter is inserted before the comment node preceding a
servlet definition.
throws: Exception - If an unexpected error occurs
testElementOrderServletAfterFilter
public void testElementOrderServletAfterFilter() throws Exception(Code)
Tests whether a servlet is inserted after a filter.
throws: Exception - If an unexpected error occurs
testElementOrderServletAfterFilterWithComment
public void testElementOrderServletAfterFilterWithComment() throws Exception(Code)
Tests whether a servlet is inserted after a filter that is preceded by
a comment node.
throws: Exception - If an unexpected error occurs
testGetFilterElementWithOneFilter
public void testGetFilterElementWithOneFilter() throws Exception(Code)
Tests whether a DOM element representing a single filter definition can
be correctly retrieved from a descriptor containing only that filter.
throws: Exception - If an unexpected error occurs
testGetFilterMappingsWithFilter
public void testGetFilterMappingsWithFilter() throws Exception(Code)
Tests whether a filter-mapping is correctly retrieved from a descriptor.
throws: Exception - If an unexpected error occurs
testGetFilterMappingsWithMultipleMappings
public void testGetFilterMappingsWithMultipleMappings() throws Exception(Code)
Tests whether multiple filter-mappings are correctly retrieved from a
descriptor.
throws: Exception - If an unexpected error occurs
testGetFilterMappingsWithOneMapping
public void testGetFilterMappingsWithOneMapping() throws Exception(Code)
Tests whether a filter-mapping is correctly retrieved from a descriptor.
throws: Exception - If an unexpected error occurs
Tests whether the filter names are retrieved in the expected order.
throws: Exception - If an unexpected error occurs
testGetFilterNamesForClassWithMultipleFilters
public void testGetFilterNamesForClassWithMultipleFilters() throws Exception(Code)
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.
throws: Exception - If an unexpected error occurs
testGetFilterNamesForClassWithSingleFilter
public void testGetFilterNamesForClassWithSingleFilter() throws Exception(Code)
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.
throws: Exception - If an unexpected error occurs
Tests whether the login-config element can be correctly retrieved.
throws: Exception - If an unexpected error occurs
testGetLoginConfigAuthMethod
public void testGetLoginConfigAuthMethod() throws Exception(Code)
Tests retrieving the authentication method from a descriptor.
throws: Exception - If an unexpected error occurs
testGetLoginConfigEmpty
public void testGetLoginConfigEmpty() throws Exception(Code)
Tests whether retrieving the login-config from an empty descriptor
returns null.
throws: Exception - If an unexpected error occurs
testGetMutlipleSecurityConstraints
public void testGetMutlipleSecurityConstraints() throws Exception(Code)
Tests whether multiple security-constraint elements are returned in
the expected order.
throws: Exception - If an unexpected error occurs
testGetMutlipleSecurityRoles
public void testGetMutlipleSecurityRoles() throws Exception(Code)
Tests whether multiple security-role elements are correctly retrieved
in the expected order.
throws: Exception - If an unexpected error occurs
testGetServletElementWithOneServlet
public void testGetServletElementWithOneServlet() throws Exception(Code)
Tests whether a servlet element is correctly retrieved from a descriptor
containing only one servlet definition.
throws: Exception - If an unexpected error occurs
testGetServletMappingsWithMultipleMappings
public void testGetServletMappingsWithMultipleMappings() throws Exception(Code)
Tests whether multiple servlet mappings are correctly retrieved from a
descriptor.
throws: Exception - If an unexpected error occurs
testGetServletMappingsWithOneMapping
public void testGetServletMappingsWithOneMapping() throws Exception(Code)
Tests whether a single serrvlet-mapping is correctly retrieved from a
descriptor.
throws: Exception - If an unexpected error occurs
Tests whether the names of the servlets defined in a descriptor are
correctly returned in the expected order.
throws: Exception - If an unexpected error occurs
testGetServletNamesForClassWithMultipleServlets
public void testGetServletNamesForClassWithMultipleServlets() throws Exception(Code)
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.
throws: Exception - If an unexpected error occurs
testGetServletNamesForClassWithSingleServlet
public void testGetServletNamesForClassWithSingleServlet() throws Exception(Code)
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.
throws: Exception - If an unexpected error occurs
testGetServletNamesForJspFileWithMultipleServlets
public void testGetServletNamesForJspFileWithMultipleServlets() throws Exception(Code)
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.
throws: Exception - If an unexpected error occurs
testGetServletNamesForJspFileWithSingleServlet
public void testGetServletNamesForJspFileWithSingleServlet() throws Exception(Code)
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.
throws: Exception - If an unexpected error occurs
testGetServletRunAsRole
public void testGetServletRunAsRole() throws Exception(Code)
Tests that the a servlets run-as role-name can be extracted
throws: Exception - If an unexpected error occurs
testGetSingleSecurityConstraint
public void testGetSingleSecurityConstraint() throws Exception(Code)
Tests whether a single security-constraint element in the descriptor is
correctly retrieved.
throws: Exception - If an unexpected error occurs
testGetSingleSecurityRole
public void testGetSingleSecurityRole() throws Exception(Code)
Tests whether a single security-role element is correctly retrieved.
throws: Exception - If an unexpected error occurs
Tests whether WebXml#getVersion returns null when the public
ID of the DOCTYPE is not recognized.
throws: Exception - If an unexpected error occurs
testGetVersionWithoutDoctype
public void testGetVersionWithoutDoctype() throws Exception(Code)
Tests whether WebXml#getVersion returns null when the
DOCTYPE is missing.
throws: Exception - If an unexpected error occurs
testHasFilterWithMultipleFilters
public void testHasFilterWithMultipleFilters() throws Exception(Code)
Tests whether
WebXml.hasFilter returns the correct values for
a descriptor containing multiple filter definitions.
throws: Exception - If an unexpected error occurs
testHasFilterWithNullName
public void testHasFilterWithNullName() throws Exception(Code)
Tests whether calling
WebXml.hasFilter with null as
filter name parameter results in a NullPointerException
being thrown.
throws: Exception - If an unexpected error occurs
testHasFilterWithOneFilter
public void testHasFilterWithOneFilter() throws Exception(Code)
Tests whether
WebXml.hasFilter returns the correct value for
a descriptor containing one filter definition.
throws: Exception - If an unexpected error occurs
Tests whether checking a descriptor with a login configuration for a
login configuration results in true.
throws: Exception - If an unexpected error occurs
testHasLoginConfigEmpty
public void testHasLoginConfigEmpty() throws Exception(Code)
Tests whether checking an empty descriptor for a login configuration
results in false.
throws: Exception - If an unexpected error occurs
testHasSecurityConstraintEmpty
public void testHasSecurityConstraintEmpty() throws Exception(Code)
Tests whether checking an empty descriptor for some security constraint
results in false.
throws: Exception - If an unexpected error occurs
testHasSecurityRoleEmpty
public void testHasSecurityRoleEmpty() throws Exception(Code)
Tests whether checking an empty descriptor for some security roles
results in false.
throws: Exception - If an unexpected error occurs
testHasServletWithMultipleServlets
public void testHasServletWithMultipleServlets() throws Exception(Code)
Tests whether
WebXml.hasServlet reports the correct values for a
descriptor containing multiple servlet definitions.
throws: Exception - If an unexpected error occurs
testHasServletWithNullName
public void testHasServletWithNullName() throws Exception(Code)
Tests whether calling
WebXml.hasServlet with a null
parameter as servlet name throws a NullPointerException.
throws: Exception - If an unexpected error occurs
testHasServletWithOneServlet
public void testHasServletWithOneServlet() throws Exception(Code)
Tests whether
WebXml.hasServlet reports the correct values for a
descriptor containing a single servlet definition.
throws: Exception - If an unexpected error occurs
testSetLoginConfigAdding
public void testSetLoginConfigAdding() throws Exception(Code)
Tests retrieving the authentication method from a descriptor.
throws: Exception - If an unexpected error occurs
testSetLoginConfigReplacing
public void testSetLoginConfigReplacing() throws Exception(Code)
Tests retrieving the authentication method from a descriptor.
throws: Exception - If an unexpected error occurs