com.counterclaim.openefm.model.lxml
Class BaseLxmlTestCase
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
com.counterclaim.openefm.BaseTestCase
com.counterclaim.openefm.model.lxml.BaseLxmlTestCase
- All Implemented Interfaces:
- junit.framework.Test
- Direct Known Subclasses:
- LegalEnvelope117LxmlTestCase
- public abstract class BaseLxmlTestCase
- extends BaseTestCase
This tests the XPath queries for different kinds of InternalLxmlFiling
objects. It calls the query methods in InternalLxmlFilingImpl, checking
first for non-null responses, then compares each one with the
instance member counterpart defined (but not initialized) in this class.
Thus, subclasses just need in the constructor to set
the 'lxmlFilePath'--which should be a build-dir-relative path to a
particular lxml sample file--and to provide expected values for those
xpath queries in the '*Expected' and the '*Input' members.
The '*Expected' members which are Objects are checked to ensure they
are instances of the class returned by the corresponding query method.
The ones which are native ints are for queries which return a list: all we
are checking for in those cases is the sizes of the lists returned.
The '*Input' members are the inputs to the query methods in
InternalLxmlFilingImpl. (Since only one 'docIdInput' is declared,
that one ID must serve for all relevant queries.)
The static 'NON_NULL' constant can be assigned to an expected value
if the test should only check for not null. This is handy when the
expected value is too lengthy or volatile to be hard-coded.
-

| Fields inherited from class junit.framework.TestCase |
|
|
Constructor Summary |
BaseLxmlTestCase(java.lang.String name)
Construct a TestCase with the given name. |
|
Method Summary |
(package private) void |
compare(int expectedSize,
java.util.List actualList)
Check a List object returned from a query method to make sure it is
not null and has the expected number of elements. |
(package private) void |
compare(java.lang.Object expected,
java.lang.Object actual)
Compare the return value from a query method with the expected result,
using the 'Object.equals()' method. |
void |
testQueries()
Test the XPath query methods. |
| Methods inherited from class com.counterclaim.openefm.BaseTestCase |
assertFalse, assertFalse, assertNegative, assertNegative, assertPositive, assertPositive, assertZero, assertZero, getController, getFilingContext, getId, getInternalLxmlFiling, getInternalLxmlFiling, getModel, getOzoneLxmlFiling, getOzoneObjectManager, getOzoneUser, getSampleInternalLxmlFiling, getSampleLxmlFiling, restartServer, setUp, startServer, tearDown |
| Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, toString |
| Methods inherited from class junit.framework.Assert |
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, 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 |
NON_NULL
static final java.lang.Object NON_NULL
lxmlFilePath
java.lang.String lxmlFilePath
filingInformationIdInput
java.lang.String filingInformationIdInput
docIdInput
java.lang.String docIdInput
roleInput
java.lang.String roleInput
actorIdInput
java.lang.String actorIdInput
filingActorRefInput
java.lang.String filingActorRefInput
messageIdentificationExpected
java.lang.Object messageIdentificationExpected
creationExpected
java.lang.Object creationExpected
courtLocationQualifierExpected
java.lang.Object courtLocationQualifierExpected
leadDocumentIdExpected
java.lang.Object leadDocumentIdExpected
documentActorReferencesExpected
int documentActorReferencesExpected
documentSubmittedExpected
java.lang.Object documentSubmittedExpected
documentTitleExpected
java.lang.Object documentTitleExpected
documentTypeExpected
java.lang.Object documentTypeExpected
documentContentExpected
java.lang.Object documentContentExpected
documentContentIdExpected
java.lang.Object documentContentIdExpected
documentContentSizeExpected
java.lang.Object documentContentSizeExpected
documentContentMimeTypeExpected
java.lang.Object documentContentMimeTypeExpected
documentContentEncodingExpected
java.lang.Object documentContentEncodingExpected
documentContentHrefExpected
java.lang.Object documentContentHrefExpected
documentAttachmentIdsExpected
int documentAttachmentIdsExpected
toFullNamesExpected
int toFullNamesExpected
toURIsExpected
int toURIsExpected
fromFullNamesExpected
int fromFullNamesExpected
fromURIsExpected
int fromURIsExpected
memosExpected
int memosExpected
actorIdsExpected
int actorIdsExpected
actorIdsWithRoleExpected
int actorIdsWithRoleExpected
actorFullNameExpected
java.lang.Object actorFullNameExpected
actorFirstNameExpected
java.lang.Object actorFirstNameExpected
actorMiddleNameExpected
java.lang.Object actorMiddleNameExpected
actorLastNameExpected
java.lang.Object actorLastNameExpected
actorRoleNameExpected
java.lang.Object actorRoleNameExpected
actorRoleWithIdsExpected
int actorRoleWithIdsExpected
actorTitleExpected
java.lang.Object actorTitleExpected
actorEmailExpected
java.lang.Object actorEmailExpected
actorPhoneExpected
java.lang.Object actorPhoneExpected
actorAddressLinesExpected
int actorAddressLinesExpected
actorAddressCityExpected
java.lang.Object actorAddressCityExpected
actorAddressCountyExpected
java.lang.Object actorAddressCountyExpected
actorAddressStateExpected
java.lang.Object actorAddressStateExpected
actorAddressZipExpected
java.lang.Object actorAddressZipExpected
actorAddressCountryExpected
java.lang.Object actorAddressCountryExpected
filingInformationIdsExpected
int filingInformationIdsExpected
filingFeeExpected
java.lang.Object filingFeeExpected
filingFeeTypeExpected
java.lang.Object filingFeeTypeExpected
creditNumberExpected
java.lang.Object creditNumberExpected
creditExpDateExpected
java.lang.Object creditExpDateExpected
creditOwnerExpected
java.lang.Object creditOwnerExpected
creditAddressLinesExpected
int creditAddressLinesExpected
creditAddressCityExpected
java.lang.Object creditAddressCityExpected
creditAddressCountyExpected
java.lang.Object creditAddressCountyExpected
creditAddressStateExpected
java.lang.Object creditAddressStateExpected
creditAddressZipExpected
java.lang.Object creditAddressZipExpected
creditAddressCountryExpected
java.lang.Object creditAddressCountryExpected
courtTypeExpected
java.lang.Object courtTypeExpected
courtNameExpected
java.lang.Object courtNameExpected
isNewCaseExpected
java.lang.Object isNewCaseExpected
fullCaseNumberExpected
java.lang.Object fullCaseNumberExpected
caseTitleExpected
java.lang.Object caseTitleExpected
caseCategoryExpected
java.lang.Object caseCategoryExpected
caseYearExpected
java.lang.Object caseYearExpected
filedByActorIdExpected
java.lang.Object filedByActorIdExpected
filingPartyEmailExpected
java.lang.Object filingPartyEmailExpected
BaseLxmlTestCase
public BaseLxmlTestCase(java.lang.String name)
- Construct a TestCase with the given name.
- Parameters:
name - a name for this test case
compare
void compare(java.lang.Object expected,
java.lang.Object actual)
- Compare the return value from a query method with the expected result,
using the 'Object.equals()' method.
- Parameters:
expected - the expected resultactual - the actual result of the call
compare
void compare(int expectedSize,
java.util.List actualList)
- Check a List object returned from a query method to make sure it is
not null and has the expected number of elements.
- Parameters:
expectedSize - the expected size of the listactualList - the actual List returned from the call
testQueries
public void testQueries()
throws java.lang.Exception
- Test the XPath query methods.
- Throws:
java.lang.Exception
Copyright © 2002 counterclaim.com. All Rights Reserved.