@UnitTest public class TypeConstraintInterceptorTest extends Object
TypeConstraintValidator and TypeConstraintPreparer only. The easymock is used to
simulate the modelservice calls.| Constructor and Description |
|---|
TypeConstraintInterceptorTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
init()
create needed dummy data.
|
void |
testPreparer()
Test preparer with not compatible target and type.
|
void |
testPreparerWithJavaClass()
Test preparer with false java class as target.
|
void |
testPrepareWithEmptyModel()
Tests preparer with empty constraint.
|
void |
testValidateWithAnnotationAttributeOnly()
Test validator with constrant where only an annotation is set expect: InterceptorException because target is not
set
|
void |
testValidateWithEmptyModel()
Test validator with empty constraint Expect: IllegalArgumentException because no annotation class is set
|
void |
testValidateWithFalseAnnotationAttribute()
Test validator with false annotation.
|
void |
testValidator1()
Test validator with a constraint where only a pojo as target is set (and the annotation).
|
void |
testValidator2()
Test validator, target and type are incompatible to each other.
|
void |
testValidator3()
Test validator.
|
void |
testValidator4()
Test validator.
|
void |
testValidator5()
Test validator where everything is fine.
|
public void init()
public void testPrepareWithEmptyModel()
throws InterceptorException
InterceptorExceptionpublic void testValidateWithEmptyModel()
throws InterceptorException
InterceptorExceptionpublic void testValidateWithAnnotationAttributeOnly()
throws InterceptorException
InterceptorExceptionpublic void testValidateWithFalseAnnotationAttribute()
throws InterceptorException
InterceptorExceptionpublic void testPreparerWithJavaClass()
throws InterceptorException
InterceptorExceptionpublic void testPreparer()
throws InterceptorException
InterceptorExceptionpublic void testValidator1()
throws InterceptorException
InterceptorExceptionpublic void testValidator2()
throws InterceptorException
InterceptorExceptionpublic void testValidator3()
throws InterceptorException
InterceptorExceptionpublic void testValidator4()
throws InterceptorException
InterceptorExceptionpublic void testValidator5()
throws InterceptorException
InterceptorExceptionCopyright © 2017 SAP SE. All Rights Reserved.