<dependency>
<groupId>osgi.enroute.junit.wrapper</groupId>
<artifactId>org.osgi.enroute.junit.wrapper</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>
testCompile 'osgi.enroute.junit.wrapper:org.osgi.enroute.junit.wrapper:1.0.0'
import org.junit.Test;
import org.osgi.test.common.annotation.InjectService;
import org.osgi.test.common.annotation.InjectService.Option;
import org.osgi.test.common.service.ServiceAware;
public class MyLibraryTest {
@InjectService
private ServiceAware serviceAware;
@Test
public void testMyLibrary() {
}
}
-runfw: org.eclipse.osgi;version='[5.0.0,6.0.0)'
-runee: JavaSE-1.8
-runbundles: \\
osgi.enroute.junit.wrapper;version='[1.0.0,2.0.0)', \\
-testpath: \\
lib/your-library.jar, \\
target/classes
mvn test -Dtest=MyLibraryTest
gradle test --tests MyLibraryTest