我想知道是否有人尝试使用本机容器测试通过pax-exam工作的blueprint.xml公开的bean /服务.
我有一个包含两个包的项目 - a)config - 接口类b)config-impl - 包含实现并将bean公开为blueprint.xml中定义的服务.
我希望测试类中的@Inject类似于提到的方法@ https://ops4j1.jira.com/wiki/display/PAXEXAM3/Getting+Started+with+OSGi+Tests应该自动在@Inject中设置实例值ed变量,但它似乎没有工作.
发送到pax-exam的选项粘贴在下面.有没有机会,是否会有更多的捆绑加载,以便pax-exam开始识别blueprint.xml并启动服务?
return options(
systemProperty("osgi.console").value("6666"),
junitBundles(),
provision(
mavenBundle("org.osgilab.testing", "commons", "1.0.0"),
mavenBundle("org.apache.commons", "com.springsource.org.apache.commons.codec", "1.3.0"),
mavenBundle("org.codehaus.jackson", "jackson-core-asl", "1.9.12"),
mavenBundle("org.codehaus.jackson", "jackson-mapper-asl", "1.9.12"),
mavenBundle("com.umum.container", "container-config", "1.0.0"),
mavenBundle("com.umum.container", "container-config-impl", "1.0.0").start()),
systemProperty("pax.exam.service.timeout").value("160000"), systemTimeout(160000));
Run Code Online (Sandbox Code Playgroud)