public class JUnitFramework
extends java.lang.Object
implements java.lang.AutoCloseable
Builder is provided to create a bundle and
install it. This makes it possible to add classes from the src or test
directories or resources. See bundle().
addBundle(String) et.
al.
addBundles(File) et. al.
getService(Class)
et. al. Notice that this framework starts in the same process as that the
JUnit code runs. This is normally a separately started VM.| Modifier and Type | Class and Description |
|---|---|
class |
JUnitFramework.BundleBuilder |
| Modifier and Type | Field and Description |
|---|---|
Jar |
bin_test |
BundleContext |
context |
Framework |
framework |
Project |
project |
java.io.File |
projectDir |
java.util.List< |
trackers |
Workspace |
workspace |
| Constructor and Description |
|---|
JUnitFramework()
Start a framework assuming the current working directory is the project
directory.
|
JUnitFramework(java.io.File projectDir)
Start a framework while providing a project directory.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Bundle> |
addBundle(java.lang.String spec) |
void |
addBundles(java.io.File bndrun) |
void |
addBundles(java.lang.String bndrun) |
JUnitFramework.BundleBuilder |
bundle() |
void |
close()
Close this framework
|
BundleContext |
getBundleContext() |
Project |
getProject() |
<T> T |
getService(java.lang.Class<T> class1) |
<T> java.util.List<T> |
getServices(java.lang.Class<T> class1) |
Workspace |
getWorkspace() |
void |
startAll(java.util.List<Bundle> bundles) |
<T> Promise<T> |
waitForService(java.lang.Class<T> class1,
long timeoutInMs) |
public final java.util.List<> trackers
public final Jar bin_test
public final Framework framework
public final BundleContext context
public final java.io.File projectDir
public Workspace workspace
public Project project
public JUnitFramework()
public JUnitFramework(java.io.File projectDir)
projectDir - public void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exceptionpublic BundleContext getBundleContext()
public <T> java.util.List<T> getServices(java.lang.Class<T> class1)
throws InvalidSyntaxException
InvalidSyntaxExceptionpublic <T> T getService(java.lang.Class<T> class1)
throws java.lang.Exception
java.lang.Exceptionpublic <T> Promise<T> waitForService(java.lang.Class<T> class1, long timeoutInMs) throws java.lang.Exception
java.lang.Exceptionpublic JUnitFramework.BundleBuilder bundle() throws java.io.IOException
java.io.IOExceptionpublic void addBundles(java.lang.String bndrun)
throws java.lang.Exception
java.lang.Exceptionpublic void addBundles(java.io.File bndrun)
throws java.lang.Exception
java.lang.Exceptionpublic Workspace getWorkspace() throws java.lang.Exception
java.lang.Exceptionpublic Project getProject() throws java.lang.Exception
java.lang.Exceptionpublic void startAll(java.util.List<Bundle> bundles)
throws BundleException
BundleExceptionpublic java.util.List<Bundle> addBundle(java.lang.String spec)
throws java.lang.Exception
java.lang.ExceptionCopyright (c) aQute SARL (2000, 2017) and others. All Rights Reserved.