use of uk.co.jemos.podam.test.dto.MemoizationPojo in project podam by devopsfolks.
the class MemoizationTest method memoizationShouldWorkCorrectlyForCollectionsAndArrays.
@Test
@Title("Memoization should work correctly for collections and arrays")
public void memoizationShouldWorkCorrectlyForCollectionsAndArrays() throws Exception {
PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactoryWithMemoizationEnabled();
podamValidationSteps.theMemoizationShouldBeEnabled(podamFactory.getStrategy(), true);
MemoizationPojo pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(MemoizationPojo.class, podamFactory);
podamValidationSteps.thePojoMustBeOfTheType(pojo, MemoizationPojo.class);
podamValidationSteps.theArrayOfTheGivenTypeShouldNotBeNullOrEmptyAndContainExactlyTheGivenNumberOfElements(pojo.getArray(), podamFactory.getStrategy().getNumberOfCollectionElements(Currency.class), Currency.class);
podamValidationSteps.theCollectionShouldNotBeNullOrEmptyAndShouldHaveExactlyTheExpectedNumberOfElements(pojo.getCollection(), Currency.class, podamFactory.getStrategy().getNumberOfCollectionElements(Currency.class));
podamValidationSteps.theMapShouldNotBeNullOrEmptyAndShouldHaveExactlyTheExpectedNumberOfElements(pojo.getMap(), Currency.class, Currency.class, podamFactory.getStrategy().getNumberOfCollectionElements(Currency.class));
}
Aggregations