Search in sources :

Example 1 with ReadOnlyComplexTypesPojo

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

the class ReadOnlyComplexTypesTest method podamShouldFillReadOnlyTypes.

@Test
@Title("Podam should fill in read-only POJOs")
public void podamShouldFillReadOnlyTypes() throws Exception {
    PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
    ReadOnlyComplexTypesPojo pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(ReadOnlyComplexTypesPojo.class, podamFactory);
    podamValidationSteps.thePojoMustBeOfTheType(pojo, ReadOnlyComplexTypesPojo.class);
    podamValidationSteps.theArrayOfTheGivenTypeShouldNotBeNullOrEmptyAndContainElementsOfTheRightType(pojo.getArray(), String.class);
    podamValidationSteps.theCollectionShouldNotBeNullOrEmptyAndContainElementsOfType(pojo.getList(), Integer.class);
    podamValidationSteps.theMapShouldNotBeNullOrEmptyAndContainElementsOfType(pojo.getMap(), Long.class, String.class);
    podamValidationSteps.thePojoMustBeOfTheType(pojo.getValue(), ReadOnlyComplexTypesPojo.Value.class);
    podamValidationSteps.thePojoMustBeOfTheType(pojo.getValue().getValue(), String.class);
}
Also used : PodamFactory(uk.co.jemos.podam.api.PodamFactory) ReadOnlyComplexTypesPojo(uk.co.jemos.podam.test.dto.ReadOnlyComplexTypesPojo) 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 ReadOnlyComplexTypesPojo (uk.co.jemos.podam.test.dto.ReadOnlyComplexTypesPojo)1