Package uk.co.jemos.podam.api

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


  @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

  @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

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

  @Test
  public void testInvisibleConstructorAndNoSetters() {

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

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

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.