2015-10-16 5 views
3

Я строю набор тестов, чтобы выполнить их на arquillian. Я следовал за этим Arquillian's starting guide Я использую этот Gradle, чтобы проверить мои тесты:Конфигурация Arquillian DeploymentException с WindowBeanHolder

providedCompile 'org.jboss.spec:jboss-javaee-7.0:1.0.3.Final' 

testCompile 'junit:junit:4.12' 
testCompile 'org.hamcrest:hamcrest-junit:2.0.0.0' 
testCompile 'org.jglue.cdi-unit:cdi-unit:3.1.3' 
testCompile 'org.mockito:mockito-core:2.0.31-beta' 
testCompile 'eu.codearte.catch-exception:catch-exception:2.0.0-ALPHA-1' 
testCompile 'com.jayway.restassured:rest-assured:2.6.0' 
testCompile 'com.carrotsearch:junit-benchmarks:0.7.2' 

testCompile 'org.jboss.arquillian.junit:arquillian-junit-container:1.1.9.Final' 
testCompile 'org.jboss.arquillian:arquillian-bom:1.1.9.Final' 
testCompile 'org.jboss.arquillian.container:arquillian-weld-ee-embedded-1.1:1.0.0.CR9' 
testCompile 'org.jboss.weld:weld-core:2.3.0.Final' 
testCompile 'org.jboss.shrinkwrap:shrinkwrap-depchain:1.2.2' 
testCompile 'org.apache.deltaspike.core:deltaspike-core-api:1.5.0' 
testCompile 'org.apache.deltaspike.core:deltaspike-core-impl:1.5.0' 
testCompile 'org.slf4j:slf4j-simple:1.7.12' 

, когда я выполняю свои тесты из Eclipse:

Он сваливает меня исключение:

<configuration> 
    <appSettings> 
     <add key="environment" value="developmentorg.jboss.weld.exceptions.DeploymentException: Exception List with 1 exceptions: 
     Exception 0 : 
     java.lang.IllegalStateException: Could not find beans for Type=class org.apache.deltaspike.core.impl.scope.window.WindowBeanHolder and qualifiers:[] 
      at org.apache.deltaspike.core.api.provider.BeanProvider.getContextualReference(BeanProvider.java:150) 
      at org.apache.deltaspike.core.impl.scope.DeltaSpikeContextExtension.initializeDeltaSpikeContexts(DeltaSpikeContextExtension.java:85) 
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 

ответ

2

Add

.addPackages(true, "org.apache.deltaspike") 

УсадитьКорпус.

Смежные вопросы