use of uk.co.jemos.podam.test.dto.SimplePojoWithMultipleAnnotationsToAttribute in project podam by devopsfolks.
the class AnnotationsTest method podamShouldHandlePojosWithAnnotatedFieldsUsingHibernateConstraintsAnnotations.
@Test
@Title("Podam should handle POJOs with multiple annotated fields, ignoring any non Podam annotation ")
public void podamShouldHandlePojosWithAnnotatedFieldsUsingHibernateConstraintsAnnotations() throws Exception {
PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
SimplePojoWithMultipleAnnotationsToAttribute pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(SimplePojoWithMultipleAnnotationsToAttribute.class, podamFactory);
podamValidationSteps.theObjectShouldNotBeNull(pojo);
podamValidationSteps.thePojoMustBeOfTheType(pojo.getIntegerWithHibernateAnnotation(), Integer.class);
podamValidationSteps.theTwoObjectsShouldBeEqual("stringFieldWithPatternRegex", pojo.getStringFieldWithPatternAnnotation());
podamValidationSteps.theTwoObjectsShouldBeEqual("testString", pojo.getStringFieldWithHibernateAnnotation());
}
Aggregations