Search in sources :

Example 1 with ConstructorWithSelfReferencesPojoAndDefaultConstructor

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

the class AnnotationsTest method podamShouldHandleConstructorsWithOneOrMoreSelfReferences.

@Test
@Title("Podam should handle POJOs with constructors that have one or more self references to the POJO class, " + "provided the required constructor is annotated with @PodamConstructor")
public void podamShouldHandleConstructorsWithOneOrMoreSelfReferences() throws Exception {
    PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
    ConstructorWithSelfReferencesPojoAndDefaultConstructor pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(ConstructorWithSelfReferencesPojoAndDefaultConstructor.class, podamFactory);
    podamValidationSteps.theObjectShouldNotBeNull(pojo);
    constructorSelfReferenceValidationSteps.theFirstSelfReferenceForPojoWithDefaultConstructorShouldNotBeNull(pojo);
    constructorSelfReferenceValidationSteps.theSecondSelfReferenceForPojoWithDefaultConstructorShouldNotBeNull(pojo);
}
Also used : PodamFactory(uk.co.jemos.podam.api.PodamFactory) ConstructorWithSelfReferencesPojoAndDefaultConstructor(uk.co.jemos.podam.test.dto.ConstructorWithSelfReferencesPojoAndDefaultConstructor) 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 ConstructorWithSelfReferencesPojoAndDefaultConstructor (uk.co.jemos.podam.test.dto.ConstructorWithSelfReferencesPojoAndDefaultConstructor)1