Mittwoch, 4. Juni 2014

Fast creation of test data

Do you know this problem? You spend too much time into developing unit tests, because you have to fill complex beans with test data? The PodamFactory offers a very easy way to create test data Pojos with reflection:

import de.havre.CpeBo;
import org.junit.Test;

public class PojoTest

  CommitmentConfigStateHandler sut;

  PodamFactory factory = new PodamFactoryImpl();

  public void testProcessConfigState_success() throws Exception
    ComplexBean pojo = factory.manufacturePojo(ComplexBean.class);

Maven dependency:


Keine Kommentare:

Kommentar veröffentlichen