Package org.nuiton.validator
Class ValidatorTestHelper
- java.lang.Object
-
- org.nuiton.validator.ValidatorTestHelper
-
public class ValidatorTestHelper extends Object
Helper methods to test the validator api.- Since:
- 2.0
- Author:
- Tony Chemit - chemit@codelutin.com
-
-
Constructor Summary
Constructors Constructor Description ValidatorTestHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
assertFieldMessages(NuitonValidatorResult result, NuitonValidatorScope scope, String field, String... expectedMessages)
static void
assertValidatorEffectiveFields(NuitonValidator<?> validator, String... expectedFields)
static void
assertValidatorEffectiveFields(NuitonValidator<?> validator, NuitonValidatorScope scope, String... expectedFields)
static void
assertValidatorEffectiveScopes(NuitonValidator<?> validator, NuitonValidatorScope... expectedScopes)
static void
assertValidatorModel(NuitonValidator<?> validator, String expectedContext, Class<?> expectedType, NuitonValidatorScope... expectedScopes)
static File
getBasedir()
static void
testPerson(NuitonValidator<Person> validator)
-
-
-
Method Detail
-
getBasedir
public static File getBasedir()
-
assertValidatorModel
public static void assertValidatorModel(NuitonValidator<?> validator, String expectedContext, Class<?> expectedType, NuitonValidatorScope... expectedScopes)
-
assertValidatorEffectiveScopes
public static void assertValidatorEffectiveScopes(NuitonValidator<?> validator, NuitonValidatorScope... expectedScopes)
-
assertValidatorEffectiveFields
public static void assertValidatorEffectiveFields(NuitonValidator<?> validator, String... expectedFields)
-
assertValidatorEffectiveFields
public static void assertValidatorEffectiveFields(NuitonValidator<?> validator, NuitonValidatorScope scope, String... expectedFields)
-
testPerson
public static void testPerson(NuitonValidator<Person> validator)
-
assertFieldMessages
public static void assertFieldMessages(NuitonValidatorResult result, NuitonValidatorScope scope, String field, String... expectedMessages)
-
-