forge / plugin-arquillian

Forge Arquillian Plugin
http://www.jboss.org/arquillian
19 stars 16 forks source link

When Creating an Arquillian test and the class file select requires any web-only features the Test.java class should create a WebArchive rather than a JavaArchive. #8

Open lincolnthree opened 12 years ago

lincolnthree commented 12 years ago

End result of the created arquillian test class should have Deployment method as follows: @Deployment public static WebArchive createDeployment() { return ShrinkWrap.create(WebArchive.class, "test.war") .addPackage(.class.getPackage()) //To ensure all necessary classes are added .addAsResource("META-INF/persistence.xml") //If this file exists .addAsWebResource(new StringAsset(""), ArchivePaths.create("WEB-INF/beans.xml")); }

Currently when running: arquillian create-test --class MyClass.java

An Arquillian test is created, but as a JavaArchive which is not correct.