Skip to content

Instantly share code, notes, and snippets.

@ge0ffrey
Created August 18, 2011 10:58
Show Gist options
  • Save ge0ffrey/1153830 to your computer and use it in GitHub Desktop.
Save ge0ffrey/1153830 to your computer and use it in GitHub Desktop.
@RunWith(Arquillian.class)
public class WebappPrototypeArqTest {
@Deployment
public static WebArchive createDeployment() {
// TODO gwt dev is in the classpath so it shades tomcat and the arq container can't boot (nevermind the classpath of shrinkwrap!)
WebArchive webArchive = ShrinkWrap.create(WebArchive.class)
.addAsResource(new File("target/classes/"))
.addAsWebInfResource(new File("target/guvnor-webapp-5.3.0-SNAPSHOT/WEB-INF/web.xml"), "web.xml")
.addAsWebInfResource(new File("target/guvnor-webapp-5.3.0-SNAPSHOT/WEB-INF/beans.xml"), "beans.xml")
.addAsLibraries(
DependencyResolvers.use(MavenDependencyResolver.class)
.includeDependenciesFromPom("pom.xml")
.resolveAsFiles(new ScopeFilter("", "compile", "runtime")));
return webArchive;
// TODO use loadMetadataFromPom instead
}
@Inject
private RulesRepository repository;
@Test
public void theRepoIsNotNull() {
assertNotNull(repository);
}
@Test
public void theRepoIsNotNull2() {
assertNotNull(repository);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment