Search in sources :

Example 1 with ReadOnlyGenericComplexTypesPojo

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

the class ReadOnlyComplexTypesTest method podamShouldFillReadOnlyComplexTypes.

@Test
@Title("Podam should fill in complex (e.g. with more than two generic types), read-only POJOs")
public void podamShouldFillReadOnlyComplexTypes() throws Exception {
    PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
    ReadOnlyGenericComplexTypesPojo<?, ?, ?> pojo = podamInvocationSteps.whenIInvokeTheFactoryForGenericTypeWithSpecificType(ReadOnlyGenericComplexTypesPojo.class, podamFactory, Character.class, Long.class, Integer.class);
    podamValidationSteps.thePojoMustBeOfTheType(pojo, ReadOnlyGenericComplexTypesPojo.class);
    podamValidationSteps.theCollectionShouldNotBeNullOrEmptyAndContainElementsOfType(pojo.getList(), Long.class);
    podamValidationSteps.theMapShouldNotBeNullOrEmptyAndContainElementsOfType(pojo.getMap(), Integer.class, String.class);
    podamValidationSteps.thePojoMustBeOfTheType(pojo.getValue(), ReadOnlyGenericComplexTypesPojo.Value.class);
    podamValidationSteps.thePojoMustBeOfTheType(pojo.getValue().getValue(), Character.class);
}
Also used : PodamFactory(uk.co.jemos.podam.api.PodamFactory) ReadOnlyGenericComplexTypesPojo(uk.co.jemos.podam.test.dto.ReadOnlyGenericComplexTypesPojo) 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 ReadOnlyGenericComplexTypesPojo (uk.co.jemos.podam.test.dto.ReadOnlyGenericComplexTypesPojo)1