Search in sources :

Example 1 with PrivateOnlyConstructorPojo

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

the class AbnormalPojosTest method podamShouldHandlePojosWithPrivateOnlyConstructors.

@Test
@Title("Podam should handle POJOs with private constructors only")
public void podamShouldHandlePojosWithPrivateOnlyConstructors() throws Exception {
    PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
    PrivateOnlyConstructorPojo pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(PrivateOnlyConstructorPojo.class, podamFactory);
    podamValidationSteps.theObjectShouldNotBeNull(pojo);
    podamValidationSteps.theStringFieldCannotBeNullOrEmpty(pojo.getFirstName());
    podamValidationSteps.theIntFieldShouldNotBeZero(pojo.getIntField());
}
Also used : PrivateOnlyConstructorPojo(uk.co.jemos.podam.test.dto.pdm33.PrivateOnlyConstructorPojo) PodamFactory(uk.co.jemos.podam.api.PodamFactory) 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 PrivateOnlyConstructorPojo (uk.co.jemos.podam.test.dto.pdm33.PrivateOnlyConstructorPojo)1