You can use groovy. But to create, say, a HTextFlowTarget, you will need to create a HProject, HProjectIteration, HPerson, HAccount, HLocale, HDocument, HTextFlow, then HTextflowTarget (I hope I don't miss any), and bear in mind all the field constraints i.e. for all non-null fields, come up with some dummy value, for apiKey, it is exactly 32 long etc. And wire all these entities by hand before you can persist them. 

If it's less boilerplate then this I am happy to convert it to groovy :) 

Patrick Huang 
Senior Software Engineer 
Engineering - Internationalisation 
Red Hat 

----- Original Message -----

> From: "Carlos Munoz" <notifications@github.com>
> To: "zanata/zanata-server" <zanata-server@noreply.github.com>
> Cc: "Patrick Huang" <pahuang@redhat.com>
> Sent: Wednesday, November 13, 2013 3:28:37 PM
> Subject: Re: [zanata-server] Use entityunit in functional test (#209)

> In
> functional-test/src/test/java/org/zanata/feature/dashboard/DashboardTest.java:
> > +            .addConstructorParameterMaker(Activity.class, 1,
> > +                FixedValueMaker.fix(
> > +                    copyCallback.getByType(HProjectIteration.class)))
> > +            .addConstructorParameterMaker(
> > +                Activity.class, 2,
> > +                RangeValuesMaker.cycle(
> > +                    copyCallback.getByType(HDocument.class),
> > +                    copyCallback.getByType(HTextFlowTarget.class)))
> > +            .addConstructorParameterMaker(
> > +                Activity.class, 3,
> > +                RangeValuesMaker
> > +                    .cycle(ActivityType.UPLOAD_SOURCE_DOCUMENT,
> > +                        ActivityType.UPDATE_TRANSLATION,
> > +                        ActivityType.UPLOAD_TRANSLATION_DOCUMENT,
> > +                        ActivityType.REVIEWED_TRANSLATION))
> > +            .addConstructorParameterMaker(Activity.class, 4,

> This looks like a lot of boilerplate. What is this maker framework giving us
> exactly?
> Couldn't we just have used groovy to create these entities?

> —
> Reply to this email directly or view it on GitHub .