Package uk.co.jemos.podam.api

Examples of uk.co.jemos.podam.api.PodamFactoryImpl


public class AttributeMetaDataTest {

  @Test
  public void testAttributeMetaData() {

    PodamFactory factory = new PodamFactoryImpl(new AbstractRandomDataProviderStrategy() {
      @Override
      public String getStringValue(AttributeMetadata attributeMetadata) {

        if (attributeMetadata.getPojoClass() == PojoSpecific.class) {
          return "specific";
        } else {
          return "classic";
        }
      }
    });

    Assert.assertEquals(factory.manufacturePojo(PojoClassic.class).getAtt(), "classic");
    Assert.assertEquals(factory.manufacturePojo(PojoSpecific.class).getAtt(), "specific");


  }
View Full Code Here


      .getInstance();

  @Before
  public void init() {

    factory = new PodamFactoryImpl(strategy);

  }
View Full Code Here

  // ------------------->> Public methods

  @Before
  public void init() {

    factory = new PodamFactoryImpl(strategy);
  }
View Full Code Here

public class Pdm43UnitTest {

  @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

public class Pdm42UnitTest {

  @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

public class ArrayUnitTest {

  @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

public class InvisibleConstructorAndNoSettersTest {

  @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

    private long startTime;
    private long stopTime;
   
    @Before
    public void setUp() {
        podamf = new PodamFactoryImpl();
            Assert.assertNotNull("The PODAM factory cannot be null!", podamf);
            Assert.assertNotNull("The factory strategy cannot be null!",
                            podamf.getStrategy());
           
            this.emf = Persistence
View Full Code Here

TOP

Related Classes of uk.co.jemos.podam.api.PodamFactoryImpl

Copyright © 2018 www.massapicom. 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.