org.springframework.batch.item.validator
Class SpringValidatorTests

java.lang.Object
  extended by TestCase
      extended by org.springframework.batch.item.validator.SpringValidatorTests

public class SpringValidatorTests
extends TestCase

Tests for SpringValidator.


Constructor Summary
SpringValidatorTests()
           
 
Method Summary
protected  void setUp()
           
 void testNullValidator()
          Validator property is not set
 void testValidateFailure()
          Typical failed validation - ValidationException is thrown
 void testValidateFailureWithFields()
          Typical failed validation - message contains the item and names of invalid fields.
 void testValidateSuccessfully()
          Typical successful validation - no exception is thrown.
 void testValidateUnsupportedType()
          Validator does not know how to validate object of the given class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringValidatorTests

public SpringValidatorTests()
Method Detail

setUp

protected void setUp()
              throws Exception
Throws:
Exception

testNullValidator

public void testNullValidator()
                       throws Exception
Validator property is not set

Throws:
Exception

testValidateUnsupportedType

public void testValidateUnsupportedType()
Validator does not know how to validate object of the given class


testValidateSuccessfully

public void testValidateSuccessfully()
Typical successful validation - no exception is thrown.


testValidateFailure

public void testValidateFailure()
Typical failed validation - ValidationException is thrown


testValidateFailureWithFields

public void testValidateFailureWithFields()
Typical failed validation - message contains the item and names of invalid fields.



Copyright © 2008 SpringSource. All Rights Reserved.