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);
}
Aggregations