@Test(expected = IllegalArgumentException.class) public void unAnnotateValidatorHandlerProcessAnnotation_whenUnSupportedClass_shouldThrowException() throws RaveException { Rave.UnAnnotatedModelValidator handler = new Rave.UnAnnotatedModelValidator(1); handler.processNonAnnotatedClasses(Object.class); handler.processNonAnnotatedClasses(String.class); handler.validateAs(new Object(), Object.class); }
@Test(expected = IllegalArgumentException.class) public void unAnnotateValidatorHandlerValidateAs_whenModelIsAnnotated_shouldThrowException() throws RaveException { Rave.UnAnnotatedModelValidator handler = new Rave.UnAnnotatedModelValidator(1); handler.validateAs(new SingleMethodSampleModel("", ""), SingleMethodSampleModel.class); }
@Test(expected = IllegalArgumentException.class) public void unAnnotateValidatorHandlerValidateAs_whenNonSupportedClass_shouldThrowException() throws RaveException { Rave.UnAnnotatedModelValidator handler = new Rave.UnAnnotatedModelValidator(1); handler.validateAs(new NonAnnotated(""), NonAnnotated.class); }
@Test(expected = UnsupportedObjectException.class) public void unAnnotateValidatorHandlerProcessAnnotation_whenUnSupportedClass_shouldThrowUnsupportedObjectException() throws RaveException { Rave.UnAnnotatedModelValidator handler = new Rave.UnAnnotatedModelValidator(1); handler.processNonAnnotatedClasses(Object.class); handler.processNonAnnotatedClasses(String.class); handler.validateAs("", String.class); }
@Test(expected = IllegalArgumentException.class) public void processNonAnnotatedClass_whenModelIsAnnotated_shouldThrowException() throws RaveException { Rave.UnAnnotatedModelValidator handler = new Rave.UnAnnotatedModelValidator(1); handler.processNonAnnotatedClasses(SingleMethodSampleModel.class); }