use of uk.co.jemos.podam.test.dto.ImmutableNoHierarchicalAnnotatedPojo in project podam by devopsfolks.
the class AnnotationsTest method podamShouldHandleImmutablePojosAnnotatedWithPodamConstructor.
@Test
@Title("Podam should handle immutable POJOs annotated with @PodamConstructor")
public void podamShouldHandleImmutablePojosAnnotatedWithPodamConstructor() throws Exception {
PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
ImmutableNoHierarchicalAnnotatedPojo pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(ImmutableNoHierarchicalAnnotatedPojo.class, podamFactory);
podamValidationSteps.theObjectShouldNotBeNull(pojo);
podamValidationSteps.theIntFieldShouldNotBeZero(pojo.getIntField());
podamValidationSteps.thePojoMustBeOfTheType(pojo.getDateCreated(), GregorianCalendar.class);
podamValidationSteps.thePojoMustBeOfTheType(pojo.getDateCreated().getTime(), Date.class);
podamValidationSteps.theArrayOfTheGivenTypeShouldNotBeNullOrEmptyAndContainElementsOfTheRightType(pojo.getLongArray(), Long.class);
podamValidationSteps.theLongValueShouldNotBeZero(pojo.getLongArray()[0]);
}
Aggregations