Question

I am studying Arquillian platform. I am following
http://arquillian.org/guides/testing_java_persistence/#write_the_test
at a certain point of the guide, you can read:

"We define the Persistence Unit in a test-persistence.xml file that’s corresponding to the target container. ShrinkWrap takes this file from the classpath and puts it into its standard location within the archive."

.addAsResource("test-persistence.xml", "META-INF/persistence.xml")

You can see this command in

src/test/java/org/arquillian/example/GamePersistenceTest.java that is in the upper part of the page.

So my question is: is this piece of the guide a simply explanation of that code line, or is something you have to add into another class to do the example?

Was it helpful?

Solution

No, it's just explaining that line, it means you need to add this file onto classpath with ShrinkWrap in order to make the persistence work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top