Search in sources :

Example 1 with SimplePojoWithMultipleAnnotationsToAttribute

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());
}
Also used : PodamFactory(uk.co.jemos.podam.api.PodamFactory) SimplePojoWithMultipleAnnotationsToAttribute(uk.co.jemos.podam.test.dto.SimplePojoWithMultipleAnnotationsToAttribute) Test(org.junit.Test) Title(net.thucydides.core.annotations.Title)

Aggregations

Title (net.thucydides.core.annotations.Title)1 Test (org.junit.Test)1 PodamFactory (uk.co.jemos.podam.api.PodamFactory)1 SimplePojoWithMultipleAnnotationsToAttribute (uk.co.jemos.podam.test.dto.SimplePojoWithMultipleAnnotationsToAttribute)1