Class AbstractFieldValidatorTest<B>
- java.lang.Object
-
- org.junit.Assert
-
- org.nuiton.validator.xwork2.field.AbstractFieldValidatorTest<B>
-
- Type Parameters:
B
- the type of bean to validate.
- Direct Known Subclasses:
AbstractValidatorBeanFieldValidatorTest
,EmailFieldValidatorTest
,FieldExpressionWithParamsValidatorTest
,FrenchCityNameFieldValidatorTest
,FrenchFinessFieldValidatorTest
,FrenchLastNameFieldValidatorTest
,FrenchPhoneNumberFieldValidatorTest
,FrenchPostCodeFieldValidatorTest
,FrenchSirenFieldValidatorTest
,FrenchSiretFieldValidatorTest
,VATIdentificationNumberFieldValidatorTest
public abstract class AbstractFieldValidatorTest<B> extends org.junit.Assert
Abstract class to test a specific validator. To implements a test on a new validator, just extends this class and implements the methodtestValidator()
.- Author:
- Tony Chemit - chemit@codelutin.com
-
-
Field Summary
Fields Modifier and Type Field Description protected static File
basedir
protected B
bean
protected static NuitonValidator<?>
cacheValidator
protected Class<B>
type
protected NuitonValidator<B>
validator
-
Constructor Summary
Constructors Constructor Description AbstractFieldValidatorTest(Class<B> type)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static void
afterclass()
protected void
assertFieldInError(String fieldName, String error, boolean required)
static void
initValidator()
void
setUp()
void
tearDown()
abstract void
testValidator()
the method to test the given validator on the given bean.-
Methods inherited from class org.junit.Assert
assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertArrayEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotEquals, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertThat, assertThat, assertThrows, assertThrows, assertTrue, assertTrue, fail, fail
-
-
-
-
Field Detail
-
cacheValidator
protected static NuitonValidator<?> cacheValidator
-
basedir
protected static File basedir
-
validator
protected NuitonValidator<B> validator
-
bean
protected B bean
-
-
Method Detail
-
testValidator
public abstract void testValidator() throws Exception
the method to test the given validator on the given bean. When coming here a validator and bean were instanciated and the bean was setted into validator via setBean method.- Throws:
Exception
- if any error ?
-
tearDown
public void tearDown()
-
-