| org.apache.commons.validator.TestCommon org.apache.commons.validator.MultipleTests
MultipleTests | public class MultipleTests extends TestCommon (Code) | | Performs Validation Test.
version: $Revision: 478334 $ $Date: 2006-11-22 21:31:54 +0000 (Wed, 22 Nov 2006) $ |
Field Summary | |
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. |
Method Summary | |
public static void | main(String[] theArgs) Start the tests.
Parameters: theArgs - the arguments. | protected void | setUp() Load ValidatorResources from
validator-multipletest.xml. | public static Test | suite() | protected void | tearDown() | public void | testBothBlank() With nothing provided, we should fail both because both are required. | public void | testFailingFirstDependentValidator() If middle name is not there, then the required dependent test should fail. | public void | testFailingNextDependentValidator() If middle name is there but not int, then the required dependent test
should pass, but the int dependent test should fail. | public 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. | public 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. | public void | testRequiredFirstNameBlankLastNameShort() If the first name fails required, and the second test fails int, we should get two errors. | public void | testRequiredLastNameLong() If first name is ok and last name is ok and is an int, no errors. | public void | testRequiredLastNameShort() If the first name is there, and the last name fails int, we should get one error. |
ACTION | protected static String ACTION(Code) | | The key used to retrieve the validator action.
|
FORM_KEY | protected static String FORM_KEY(Code) | | The key used to retrieve the set of validation
rules from the xml file.
|
main | public static void main(String[] theArgs)(Code) | | Start the tests.
Parameters: theArgs - the arguments. Not used |
suite | public static Test suite()(Code) | | a test suite (TestSuite ) that includes all methodsstarting with "test" |
tearDown | protected void tearDown()(Code) | | |
testBothBlank | public void testBothBlank() throws ValidatorException(Code) | | With nothing provided, we should fail both because both are required.
|
testFailingFirstDependentValidator | public void testFailingFirstDependentValidator() throws ValidatorException(Code) | | If middle name is not there, then the required dependent test should fail.
No other tests should run
throws: ValidatorException - |
testFailingNextDependentValidator | public void testFailingNextDependentValidator() throws ValidatorException(Code) | | If middle name is there but not int, then the required dependent test
should pass, but the int dependent test should fail. No other tests should
run.
throws: ValidatorException - |
testPassingDependentsFailingMain | public void testPassingDependentsFailingMain() throws ValidatorException(Code) | | If middle name is there and a negative int, then the required and int
dependent tests should pass, but the positive test should fail.
throws: ValidatorException - |
testPassingDependentsPassingMain | public void testPassingDependentsPassingMain() throws ValidatorException(Code) | | If middle name is there and a positve int, then the required and int
dependent tests should pass, and the positive test should pass.
throws: ValidatorException - |
testRequiredFirstNameBlankLastNameShort | public void testRequiredFirstNameBlankLastNameShort() throws ValidatorException(Code) | | If the first name fails required, and the second test fails int, we should get two errors.
|
testRequiredLastNameLong | public void testRequiredLastNameLong() throws ValidatorException(Code) | | If first name is ok and last name is ok and is an int, no errors.
|
testRequiredLastNameShort | public void testRequiredLastNameShort() throws ValidatorException(Code) | | If the first name is there, and the last name fails int, we should get one error.
|
|
|