use of uk.co.jemos.podam.test.dto.PojoWithMapsAndCollections in project podam by devopsfolks.
the class ExtensionsTest method podamShouldCreatePojosInAccordanceWithCustomDataProviderStrategies.
@Test
@Title("Podam should create POJOs in accordance with custom data provider strategies")
public void podamShouldCreatePojosInAccordanceWithCustomDataProviderStrategies() throws Exception {
CustomRandomDataProviderStrategy strategy = podamFactorySteps.givenACustomRandomDataProviderStrategy();
PodamFactory podamFactory = podamFactorySteps.givenAPodamFactoryWithCustomDataProviderStrategy(strategy);
PojoWithMapsAndCollections pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(PojoWithMapsAndCollections.class, podamFactory);
podamValidationSteps.theObjectShouldNotBeNull(pojo);
podamValidationSteps.theArrayOfTheGivenTypeShouldNotBeNullOrEmptyAndContainExactlyTheGivenNumberOfElements(pojo.getArray(), 2, String.class);
podamValidationSteps.theCollectionShouldNotBeNullOrEmptyAndShouldHaveExactlyTheExpectedNumberOfElements(pojo.getList(), Boolean.class, 3);
podamValidationSteps.theMapShouldNotBeNullOrEmptyAndShouldHaveExactlyTheExpectedNumberOfElements(pojo.getMap(), Integer.class, Long.class, 4);
}
use of uk.co.jemos.podam.test.dto.PojoWithMapsAndCollections in project podam by devopsfolks.
the class RandomDataProviderStrategyImplInitialisationUnitTest method podamShouldCreatePojosInAccordanceWithCustomDataProviderStrategies.
@Test
@Title("Podam should create POJOs in accordance with custom data provider strategies")
public void podamShouldCreatePojosInAccordanceWithCustomDataProviderStrategies() throws Exception {
DataProviderStrategy strategy = podamFactorySteps.givenACustomRandomDataProviderStrategy();
PodamFactory podamFactory = podamFactorySteps.givenAPodamFactoryWithCustomDataProviderStrategy(strategy);
PojoWithMapsAndCollections pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(PojoWithMapsAndCollections.class, podamFactory);
podamValidationSteps.theObjectShouldNotBeNull(pojo);
podamValidationSteps.theArrayOfTheGivenTypeShouldNotBeNullOrEmptyAndContainExactlyTheGivenNumberOfElements(pojo.getArray(), 2, String.class);
podamValidationSteps.theCollectionShouldNotBeNullOrEmptyAndShouldHaveExactlyTheExpectedNumberOfElements(pojo.getList(), Boolean.class, 3);
podamValidationSteps.theMapShouldNotBeNullOrEmptyAndShouldHaveExactlyTheExpectedNumberOfElements(pojo.getMap(), Integer.class, Long.class, 4);
}
Aggregations