Not with our helpers, but you can specify and do this in a helper object and
do it in code. I think it would actually be easier to do it in code than in
yet another language (XML) and easier to maintain. You'll have more
flexibility and won't have to troubleshoot problems mapping from XML to your
tests.

Some tips about fixtures:
http://junit.sourceforge.net/doc/faq/faq.htm#tests_2

On Tue, Jul 13, 2010 at 5:34 AM, vhazrati <vhazr...@gmail.com> wrote:

> Hi,
>
> We are using JPA for our Dao's to interact with the datastore. I was
> wondering is there is a way to load seed data for unit testing. I can
> insert the entities using JPA in the setup() method here
>
> private final LocalServiceTestHelper helper = new
> LocalServiceTestHelper(new LocalDatastoreServiceTestConfig());
>
>        @Before
>        public void setUp() {
>                helper.setUp();
>        }
>
> but I was wondering if the LocalServiceTestHelper / anyother has a
> convenience method for loading the seed data from an XML file. The
> data would be present like this
>
> <?xml version='1.0' encoding='UTF-8'?>
> <dataset>
>  <USER_ROLE ROLE="ROLE_ADMIN" NAME="Administrator"/>
>  <USER_ROLE ROLE="ROLE_CONSULTANT" NAME="Consultant"/>
>  <USER_ROLE ROLE="ROLE_PROJECTMANAGER" NAME="Project Manager"/>
>  <USER_ROLE ROLE="ROLE_REPORT" NAME="Reporter"/>
>
>  <USER_TO_USERROLE ROLE="ROLE_CONSULTANT" USER_ID="1"/>
>  <USER_TO_USERROLE ROLE="ROLE_PROJECTMANAGER" USER_ID="1"   />
>
> </dataset>
>
> Regards | Vikas
> www.inphina.com
> thoughts.inphina.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appeng...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>


-- 
Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to