Hello, i have got a problem with validator. I try to explain. I have created a class model annotated with the next validator annotation:
Quote:
@Pattern(regex="expression")
This works perfectly. But when i have created a junit file occurs the next situation. If i put the test method that has correct values for
Quote:
@Pattern
n, first, then the method is executed ok, and the next test method (what has an invalid value for
Quote:
@Pattern
), works perfectly too and detects the error. But if i put first the test that has invalid value, the invalid value test works perfectly, but the second test (which has a correct value) also tells me that the value is incorrect, and the exception of InvalidStateException is thrown.
Im using Annotations 3.1beta8 and Hibernate 3.1.1, and using an interceptor for controlling the session. That interceptor is a copy paste of Caveatemptor Servlet Filter but in an interceptor.
It curious because depends of the order of execution all works or only the tests that has valid parameters doesn't work.
Thank you very much for your help.