public class MultipleTest extends AbstractCommonTest
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ACTION
The key used to retrieve the validator action.
|
protected static String |
FORM_KEY
The key used to retrieve the set of validation
rules from the xml file.
|
resources| Constructor and Description |
|---|
MultipleTest(String name) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
setUp()
Load
ValidatorResources from
validator-multipletest.xml. |
protected void |
tearDown() |
void |
testBothBlank()
With nothing provided, we should fail both because both are required.
|
void |
testFailingFirstDependentValidator()
If middle name is not there, then the required dependent test should fail.
|
void |
testFailingNextDependentValidator()
If middle name is there but not int, then the required dependent test
should pass, but the int dependent test should fail.
|
void |
testPassingDependentsFailingMain()
If middle name is there and a negative int, then the required and int
dependent tests should pass, but the positive test should fail.
|
void |
testPassingDependentsPassingMain()
If middle name is there and a positve int, then the required and int
dependent tests should pass, and the positive test should pass.
|
void |
testRequiredFirstNameBlankLastNameShort()
If the first name fails required, and the second test fails int, we should get two errors.
|
void |
testRequiredLastNameLong()
If first name is ok and last name is ok and is an int, no errors.
|
void |
testRequiredLastNameShort()
If the first name is there, and the last name fails int, we should get one error.
|
loadResourcescountTestCases, createResult, getName, run, run, runBare, runTest, setName, toStringassertEquals, 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, failNotEquals, failNotSame, failSameprotected static String FORM_KEY
public MultipleTest(String name)
protected void setUp() throws IOException, SAXException
ValidatorResources from
validator-multipletest.xml.setUp in class junit.framework.TestCaseIOExceptionSAXExceptionprotected void tearDown()
tearDown in class junit.framework.TestCasepublic void testBothBlank() throws org.apache.commons.validator.ValidatorException
org.apache.commons.validator.ValidatorExceptionpublic void testRequiredFirstNameBlankLastNameShort() throws org.apache.commons.validator.ValidatorException
org.apache.commons.validator.ValidatorExceptionpublic void testRequiredLastNameShort() throws org.apache.commons.validator.ValidatorException
org.apache.commons.validator.ValidatorExceptionpublic void testRequiredLastNameLong() throws org.apache.commons.validator.ValidatorException
org.apache.commons.validator.ValidatorExceptionpublic void testFailingFirstDependentValidator() throws org.apache.commons.validator.ValidatorException
ValidatorExceptionpublic void testFailingNextDependentValidator() throws org.apache.commons.validator.ValidatorException
ValidatorExceptionpublic void testPassingDependentsFailingMain() throws org.apache.commons.validator.ValidatorException
ValidatorExceptionpublic void testPassingDependentsPassingMain() throws org.apache.commons.validator.ValidatorException
ValidatorExceptionCopyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.