Virgo OSGi modules integration test [message #707363] |
Mon, 01 August 2011 14:56 |
Dan Messages: 4 Registered: August 2011 Location: Minsk, BY |
Junior Member |
|
|
I'm trying to write tests for %subject%.
Something like BundleDeployerIntegrationTests.java
so I wrote similar test.
public class OSGiContainerTest extends AbstractDeployerIntegrationTest {
private static final String TEST_BUNDLE_TYPE = "bundle";
private static final String TEST_BUNDLE_SYMBOLIC_NAME = "de.enexoma.dlms-service";
private static final String TEST_BUNDLE_VERSION = "1.2.0-SNAPSHOT";
@Test
public void testDeployer() throws Exception {
File file = new File("../out/de.enexoma.dlms-service-1.2.0-SNAPSHOT.jar");
DeploymentIdentity deploymentId = deployer.deploy(file.toURI());
assertDeploymentIdentityEquals(deploymentId, "testbundle.jar", TEST_BUNDLE_TYPE, TEST_BUNDLE_SYMBOLIC_NAME, TEST_BUNDLE_VERSION);
assertNotNull(ApplicationContextUtils.getApplicationContext(context, TEST_BUNDLE_SYMBOLIC_NAME));
deployer.undeploy(deploymentId.getType(), deploymentId.getSymbolicName(), deploymentId.getVersion());
// Check that the test bundle's application context is destroyed.
assertNull(ApplicationContextUtils.getApplicationContext(context, TEST_BUNDLE_SYMBOLIC_NAME));
}
}
Now I need to include in class path org.eclipse.virgo.kernel.deployer.test.AbstractDeployerIntegrationTest.
and i included some dependencies
<dependencies>
<dependency>
<groupId>org.eclipse.virgo.kernel</groupId>
<artifactId>org.eclipse.virgo.kernel.deployer</artifactId>
<version>2.1.0.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.virgo.kernel</groupId>
<artifactId>org.eclipse.virgo.kernel.osgi</artifactId>
<version>2.1.0.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.virgo.test</groupId>
<artifactId>org.eclipse.virgo.test.framework</artifactId>
<version>2.1.0.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.virgo.kernel</groupId>
<artifactId>org.eclipse.virgo.kernel.deployer.test</artifactId>
<version>2.1.0.RELEASE</version>
<scope>test</scope>
</dependency>
</dependencies>
But org.eclipse.virgo.kernel.deployer.test artifact contains no classes, just META-INF dir and org.springframework.beans-2.5.6.A.jar/org.springframework.core-2.5.6.A.jar files.
So if I browsing git repository I see required classes but if I fetch them from repository they are not there.
Can someone help me?
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02808 seconds