Search in sources :

Example 1 with GenericCollectionsConstructorPojo

use of uk.co.jemos.podam.test.dto.issue123.GenericCollectionsConstructorPojo in project podam by devopsfolks.

the class ConstructorsUnitTest method podamShouldHandleGenericCollectionsInConstructorWithMemoizationEnabled.

@Test
@Title("Podam should correctly handle generic collections in constructor with memoization enabled")
public void podamShouldHandleGenericCollectionsInConstructorWithMemoizationEnabled() throws Exception {
    PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactoryWithMemoizationEnabled();
    GenericCollectionsConstructorPojo pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(GenericCollectionsConstructorPojo.class, podamFactory);
    podamValidationSteps.thePojoMustBeOfTheType(pojo, GenericCollectionsConstructorPojo.class);
    podamValidationSteps.theCollectionShouldNotBeNullOrEmptyAndContainElementsOfType(pojo.getList1(), Long.class);
    podamValidationSteps.theCollectionShouldNotBeNullOrEmptyAndContainElementsOfType(pojo.getList2(), String.class);
    podamValidationSteps.theCollectionShouldNotBeNullOrEmptyAndContainElementsOfType(pojo.getList3(), Integer.class);
}
Also used : GenericCollectionsConstructorPojo(uk.co.jemos.podam.test.dto.issue123.GenericCollectionsConstructorPojo) PodamFactory(uk.co.jemos.podam.api.PodamFactory) Test(org.junit.Test) Title(net.thucydides.core.annotations.Title)

Example 2 with GenericCollectionsConstructorPojo

use of uk.co.jemos.podam.test.dto.issue123.GenericCollectionsConstructorPojo in project podam by devopsfolks.

the class ConstructorsUnitTest method podamShouldHandleGenericCollectionsInConstructorWithMemoizationDisabled.

@Test
@Title("Podam should correctly handle generic collections in constructor with memoization disabled")
public void podamShouldHandleGenericCollectionsInConstructorWithMemoizationDisabled() throws Exception {
    PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
    GenericCollectionsConstructorPojo pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(GenericCollectionsConstructorPojo.class, podamFactory);
    podamValidationSteps.thePojoMustBeOfTheType(pojo, GenericCollectionsConstructorPojo.class);
    podamValidationSteps.theCollectionShouldNotBeNullOrEmptyAndContainElementsOfType(pojo.getList1(), Long.class);
    podamValidationSteps.theCollectionShouldNotBeNullOrEmptyAndContainElementsOfType(pojo.getList2(), String.class);
    podamValidationSteps.theCollectionShouldNotBeNullOrEmptyAndContainElementsOfType(pojo.getList3(), Integer.class);
}
Also used : GenericCollectionsConstructorPojo(uk.co.jemos.podam.test.dto.issue123.GenericCollectionsConstructorPojo) PodamFactory(uk.co.jemos.podam.api.PodamFactory) Test(org.junit.Test) Title(net.thucydides.core.annotations.Title)

Aggregations

Title (net.thucydides.core.annotations.Title)2 Test (org.junit.Test)2 PodamFactory (uk.co.jemos.podam.api.PodamFactory)2 GenericCollectionsConstructorPojo (uk.co.jemos.podam.test.dto.issue123.GenericCollectionsConstructorPojo)2