use of uk.co.jemos.podam.api.PodamFactory in project podam by devopsfolks.
the class PodamFactoryBasicTypesTest method podamShouldSupportCircularDependencies.
@Test
@Title("Podam should fill in POJOs which have a circular dependency")
public void podamShouldSupportCircularDependencies() throws Exception {
PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
Parent parent = podamInvocationSteps.whenIInvokeTheFactoryForClass(Parent.class, podamFactory);
podamValidationSteps.thePojoMustBeOfTheType(parent, Parent.class);
Child child = parent.getChild();
podamValidationSteps.thePojoMustBeOfTheType(child, Child.class);
}
use of uk.co.jemos.podam.api.PodamFactory in project podam by devopsfolks.
the class PodamFactoryBasicTypesTest method podamShouldIgnoreWildcardEnumFields.
@Test
@Title("Podam should fill in wildcard Enum fields")
public void podamShouldIgnoreWildcardEnumFields() throws Exception {
PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
WildcardEnumPojo pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(WildcardEnumPojo.class, podamFactory);
podamValidationSteps.thePojoMustBeOfTheType(pojo, WildcardEnumPojo.class);
Enum<?> wildcardEnumField = pojo.getWildcardEnumField();
podamValidationSteps.thePojoMustBeOfTheType(wildcardEnumField, Enum.class);
}
use of uk.co.jemos.podam.api.PodamFactory in project podam by devopsfolks.
the class PodamFactoryBasicTypesTest method podamShouldFillJavaStringType.
@Test
@Title("Podam should fill Java string type")
public void podamShouldFillJavaStringType() throws Exception {
PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
String pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(String.class, podamFactory);
podamValidationSteps.theStringFieldCannotBeNullOrEmpty(pojo);
}
use of uk.co.jemos.podam.api.PodamFactory in project podam by devopsfolks.
the class PodamFactoryBasicTypesTest method podamShouldFillJavaStringTypeWithFullConstructor.
@Test
@Title("Podam should fill Java string type with full constructor")
public void podamShouldFillJavaStringTypeWithFullConstructor() throws Exception {
PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
String pojo = podamInvocationSteps.whenIInvokeTheFactoryForClassWithFullConstructor(String.class, podamFactory);
podamValidationSteps.theStringFieldCannotBeNullOrEmpty(pojo);
}
use of uk.co.jemos.podam.api.PodamFactory in project podam by devopsfolks.
the class PodamFactoryBasicTypesTest method invokingPodamOnAnInterfaceShouldReturnAnEmptyPojo.
@Test
@Title("Invoking Podam on an interface should return an empty POJO")
public void invokingPodamOnAnInterfaceShouldReturnAnEmptyPojo() throws Exception {
PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
InterfacePojo pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(InterfacePojo.class, podamFactory);
podamValidationSteps.thePojoShouldBeNull(pojo);
}
Aggregations