use of uk.co.jemos.podam.api.PodamFactory in project podam by devopsfolks.
the class CollectionsTest method podamShouldFillInPojosWithAttributesContainingWildcards.
@Test
@Title("Podam should fill in POJOs with attributes containing wildcards")
public void podamShouldFillInPojosWithAttributesContainingWildcards() throws Exception {
PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
ReadOnlyWildcardFieldsPojo pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(ReadOnlyWildcardFieldsPojo.class, podamFactory);
podamValidationSteps.thePojoMustBeOfTheType(pojo, ReadOnlyWildcardFieldsPojo.class);
podamValidationSteps.theCollectionShouldNotBeNullOrEmptyAndContainElementsOfType(pojo.getList(), Object.class);
podamValidationSteps.theMapShouldNotBeNullOrEmptyAndContainElementsOfType(pojo.getMap(), Object.class, Object.class);
}
use of uk.co.jemos.podam.api.PodamFactory in project podam by devopsfolks.
the class ConstructorsUnitTest method podamShouldBeAbleToManufactureInstancesOfTheObservableClass.
@Test
@Title("Podam should be able to manufacture instances of the Observable class")
public void podamShouldBeAbleToManufactureInstancesOfTheObservableClass() throws Exception {
PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
Observable observable = podamInvocationSteps.whenIInvokeTheFactoryForClass(Observable.class, podamFactory);
podamValidationSteps.thePojoMustBeOfTheType(observable, Observable.class);
}
use of uk.co.jemos.podam.api.PodamFactory in project podam by devopsfolks.
the class ConstructorsUnitTest method podamShouldInstantiateAbstractClassesForWhichItKnowsConcreteTypes.
@Test
@Title("Podam should be able to create instances of abstract POJOs with factory methods which return concrete types")
public void podamShouldInstantiateAbstractClassesForWhichItKnowsConcreteTypes() throws Exception {
PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
TimeZone pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(TimeZone.class, podamFactory);
podamValidationSteps.thePojoMustBeOfTheType(pojo, TimeZone.class);
}
use of uk.co.jemos.podam.api.PodamFactory in project podam by devopsfolks.
the class ConstructorsUnitTest method podamShouldCreateInstancesOfInnerClasses.
@Test
@Title("Podam should be able to create instances of inner classes")
public void podamShouldCreateInstancesOfInnerClasses() throws Exception {
PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
InnerClassPojo pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(InnerClassPojo.class, podamFactory);
podamValidationSteps.thePojoMustBeOfTheType(pojo, InnerClassPojo.class);
podamValidationSteps.thePojoMustBeOfTheType(pojo.getIp(), InnerPojo.class);
}
use of uk.co.jemos.podam.api.PodamFactory in project podam by devopsfolks.
the class ReadOnlyComplexTypesTest method podamShouldCreateAnInstanceOfAnAbstractClassWithAFactoryMethodWhichReturnsAConcreteType.
@Test
@Title("Podam should create an instance of an Abstract class with a factory method which returns a concrete type" + " even if the concrete type has got read-only attributes. These will be empty.")
public void podamShouldCreateAnInstanceOfAnAbstractClassWithAFactoryMethodWhichReturnsAConcreteType() throws Exception {
PodamFactory podamFactory = podamFactorySteps.givenAStandardPodamFactory();
ReadOnlyAbstract pojo = podamInvocationSteps.whenIInvokeTheFactoryForClass(ReadOnlyAbstract.class, podamFactory);
podamValidationSteps.thePojoMustBeOfTheType(pojo, ReadOnlyAbstract.class);
}
Aggregations