Examples of manufacturePojo()


Examples of uk.co.jemos.podam.api.PodamFactory.manufacturePojo()

  @Test
  public void validateDtoInstantiation() {

    PodamFactory podamFactory = new PodamFactoryImpl();
    ConcreteBusinessObject pojo = podamFactory
        .manufacturePojo(ConcreteBusinessObject.class);
    Assert.assertNotNull("The created POJO cannot be null!", pojo);

  }
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactory.manufacturePojo()

  @Test
  public void testPdm42Scenario() throws Exception {

    PodamFactory factory = new PodamFactoryImpl();
    A pojo = factory.manufacturePojo(A.class);
    Assert.assertNotNull("The class A cannot be null!", pojo);

    B b = pojo.getB();

    Assert.assertNotNull("The B object cannot be null!", b);
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactory.manufacturePojo()

  @Test
  public void testArrayCreation() throws Exception {

    PodamFactory podam = new PodamFactoryImpl();
    ArrayPojo pojo = podam.manufacturePojo(ArrayPojo.class);

    Assert.assertNotNull(pojo);

    String[] array = pojo.getMyStringArray();
    Assert.assertTrue("The array should not be empty", array.length > 0);
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactory.manufacturePojo()

public class TypedClassTest {

  @Test
  public void testTypedClassInstantiation(){
    PodamFactory factory = new PodamFactoryImpl();
    TypedClassPojo2 pojo = factory.manufacturePojo(TypedClassPojo2.class);
    Assert.assertNotNull(pojo);
    Assert.assertNotNull(pojo.getTypedValue());
    Assert.assertNotNull(pojo.getTypedList());
  }
}
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactory.manufacturePojo()

  @Test
  public void testInvisibleConstructorAndNoSetters() {

    PodamFactory factory = new PodamFactoryImpl();
    InvisibleConstructorAndNoSettersPojo pojo = factory.manufacturePojo(
        InvisibleConstructorAndNoSettersPojo.class);
    assertNotNull(pojo);
  }
}
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactory.manufacturePojo()

public class InnerClassTest {

  @Test
  public void normalInnerClass(){
    PodamFactory factory = new PodamFactoryImpl();
    InnerClassPojo innerClassPojo = factory.manufacturePojo(InnerClassPojo.class);
    Assert.assertNotNull(innerClassPojo);
    Assert.assertNotNull(innerClassPojo.getIp());
  }
}
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactoryImpl.manufacturePojo()

  public void testRandomDataProviderStrategy() {

    strategy = RandomDataProviderStrategy.getInstance();
    PodamFactory factory = new PodamFactoryImpl(strategy);
    PojoWithMapsAndCollections pojo =
        factory.manufacturePojo(PojoWithMapsAndCollections.class);

    Assert.assertNotNull("POJO manufacturing failed", pojo);
    Assert.assertNotNull("Array is null", pojo.getArray());
    Assert.assertEquals(
        strategy.getNumberOfCollectionElements(Object.class),
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactoryImpl.manufacturePojo()

  public void testCustomRandomDataProviderStrategy() {

    strategy = new CustomRandomDataProviderStrategy();
    PodamFactory factory = new PodamFactoryImpl(strategy);
    PojoWithMapsAndCollections pojo =
        factory.manufacturePojo(PojoWithMapsAndCollections.class);

    Assert.assertNotNull("POJO manufacturing failed", pojo);
    Assert.assertNotNull("Array is null", pojo.getArray());
    Assert.assertEquals(2, pojo.getArray().length);
    Assert.assertNotNull("List is null", pojo.getList());
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactoryImpl.manufacturePojo()

  public void testRandomProviderStrategyForLong() {

    strategy = new CustomRandomDataProviderStrategy();
    PodamFactory factory = new PodamFactoryImpl(strategy);
    Map<Long,String> pojo =
        factory.manufacturePojo(HashMap.class, Long.class, String.class);

    Assert.assertNotNull("POJO manufacturing failed", pojo);
    Assert.assertEquals("Wrong map size",
        strategy.getNumberOfCollectionElements(String.class),
        pojo.size());
View Full Code Here

Examples of uk.co.jemos.podam.api.PodamFactoryImpl.manufacturePojo()

public class PackagePrivatePojoTest {

  @Test
  public void testPackagePrivateClassInstantiation() {
    PodamFactory factory = new PodamFactoryImpl();
    PackagePrivatePojo pojo = factory
        .manufacturePojo(PackagePrivatePojo.class);
    Assert.assertNotNull(pojo);
    Assert.assertNotNull(pojo.getValue());

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.