Search in sources :

Example 1 with OneDimensionalTestPojo

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

the class SingletonsTest method podamShouldHandleSingletonsWithParametersInPublicStaticMethod.

@Test
@Title("Podam should handle Singletons with parameters in the static method")
public void podamShouldHandleSingletonsWithParametersInPublicStaticMethod() throws Exception {
    PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
    SingletonWithParametersInStaticFactoryPojo pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(SingletonWithParametersInStaticFactoryPojo.class, podamFactory);
    podamValidationSteps.thePojoMustBeOfTheType(pojo, SingletonWithParametersInStaticFactoryPojo.class);
    podamValidationSteps.thePojoMustBeOfTheType(pojo.getCreateDate(), GregorianCalendar.class);
    podamValidationSteps.theStringFieldCannotBeNullOrEmpty(pojo.getFirstName());
    List<OneDimensionalTestPojo> pojoList = pojo.getPojoList();
    podamValidationSteps.theCollectionShouldNotBeNullOrEmptyAndContainElementsOfType(pojoList, OneDimensionalTestPojo.class);
    Map<String, OneDimensionalTestPojo> pojoMap = pojo.getPojoMap();
    podamValidationSteps.theMapShouldNotBeNullOrEmptyAndContainElementsOfType(pojoMap, String.class, OneDimensionalTestPojo.class);
}
Also used : OneDimensionalTestPojo(uk.co.jemos.podam.test.dto.OneDimensionalTestPojo) PodamFactory(uk.co.jemos.podam.api.PodamFactory) SingletonWithParametersInStaticFactoryPojo(uk.co.jemos.podam.test.dto.SingletonWithParametersInStaticFactoryPojo) 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 OneDimensionalTestPojo (uk.co.jemos.podam.test.dto.OneDimensionalTestPojo)1 SingletonWithParametersInStaticFactoryPojo (uk.co.jemos.podam.test.dto.SingletonWithParametersInStaticFactoryPojo)1