|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knowhowlab.osgi.testing.assertions.OSGiAssert
org.knowhowlab.osgi.testing.assertions.BundleAssert
public class BundleAssert
A set of OSGi Bundle specific assertion methods useful for writing tests.
Before use it could be initialized with default BundleContextOSGiAssert.setDefaultBundleContext(org.osgi.framework.BundleContext)
AssertionError,
OSGiAssert| Method Summary | |
|---|---|
static void |
assertBundleAvailable(long bundleId)
Asserts that Bundle with bundleId is available in OSGi framework. |
static void |
assertBundleAvailable(String symbolicName)
Asserts that Bundle with symbolic name is available in OSGi framework. |
static void |
assertBundleAvailable(String message,
long bundleId)
Asserts that Bundle with bundleId is available in OSGi framework. |
static void |
assertBundleAvailable(String message,
String symbolicName)
Asserts that Bundle with symbolic name is available in OSGi framework. |
static void |
assertBundleAvailable(String message,
String symbolicName,
org.osgi.framework.Version version)
Asserts that Bundle with symbolic name and version is available in OSGi framework. |
static void |
assertBundleAvailable(String symbolicName,
org.osgi.framework.Version version)
Asserts that Bundle with symbolic name and version is available in OSGi framework. |
static void |
assertBundleEvent(int eventTypeMask,
int bundleId,
long timeoutInMillis)
Asserts that BundleEvent for defined bundle will be fired within given timeoutInMillis. |
static void |
assertBundleEvent(int eventTypeMask,
int bundleId,
long timeout,
TimeUnit timeUnit)
Asserts that BundleEvent for defined bundle will be fired within given timeout. |
static void |
assertBundleEvent(int eventTypeMask,
String symbolicName,
long timeoutInMillis)
Asserts that BundleEvent for defined bundle will be fired within given timeoutInMillis. |
static void |
assertBundleEvent(int eventTypeMask,
String symbolicName,
long timeout,
TimeUnit timeUnit)
Asserts that BundleEvent for defined bundle will be fired within given timeout. |
static void |
assertBundleEvent(int eventTypeMask,
String symbolicName,
long timeout,
org.osgi.framework.Version version,
TimeUnit timeUnit)
Asserts that BundleEvent for defined bundle will be fired within given timeout. |
static void |
assertBundleEvent(int eventTypeMask,
String symbolicName,
org.osgi.framework.Version version,
long timeoutInMillis)
Asserts that BundleEvent for defined bundle will be fired within given timeoutInMillis. |
static void |
assertBundleEvent(String message,
int eventTypeMask,
int bundleId,
long timeoutInMillis)
Asserts that BundleEvent for defined bundle will be fired within given timeoutInMillis. |
static void |
assertBundleEvent(String message,
int eventTypeMask,
int bundleId,
long timeout,
TimeUnit timeUnit)
Asserts that BundleEvent for defined bundle will be fired within given timeout. |
static void |
assertBundleEvent(String message,
int eventTypeMask,
String symbolicName,
long timeoutInMillis)
Asserts that BundleEvent for defined bundle will be fired within given timeoutInMillis. |
static void |
assertBundleEvent(String message,
int eventTypeMask,
String symbolicName,
long timeout,
TimeUnit timeUnit)
Asserts that BundleEvent for defined bundle will be fired within given timeout. |
static void |
assertBundleEvent(String message,
int eventTypeMask,
String symbolicName,
org.osgi.framework.Version version,
long timeoutInMillis)
Asserts that BundleEvent for defined bundle will be fired within given timeoutInMillis. |
static void |
assertBundleEvent(String message,
int eventTypeMask,
String symbolicName,
org.osgi.framework.Version version,
long timeout,
TimeUnit timeUnit)
Asserts that BundleEvent for defined bundle will be fired within given timeout. |
static void |
assertBundleState(int state,
long bundleId)
Asserts that Bundle with bundleId has given state value. |
static void |
assertBundleState(int state,
String symbolicName)
Asserts that Bundle with symbolic name has given state value. |
static void |
assertBundleState(int state,
String symbolicName,
long timeoutInMillis)
Asserts that Bundle with symbolic name has given state value. |
static void |
assertBundleState(int stateMask,
String symbolicName,
long timeout,
TimeUnit timeUnit)
Asserts that Bundle with symbolic name has given stateMask value. |
static void |
assertBundleState(int state,
String symbolicName,
org.osgi.framework.Version version)
Asserts that Bundle with symbolic name and version has given state value. |
static void |
assertBundleState(int stateMask,
String symbolicName,
org.osgi.framework.Version version,
long timeout,
TimeUnit timeUnit)
Asserts that Bundle with symbolic name and version has given stateMask value. |
static void |
assertBundleState(String message,
int state,
long bundleId)
Asserts that Bundle with bundleId has given state value. |
static void |
assertBundleState(String message,
int state,
String symbolicName)
Asserts that Bundle with symbolic name has given state value. |
static void |
assertBundleState(String message,
int stateMask,
String symbolicName,
long timeoutInMillis)
Asserts that Bundle with symbolic name has given stateMask value. |
static void |
assertBundleState(String message,
int stateMask,
String symbolicName,
long timeout,
TimeUnit timeUnit)
Asserts that Bundle with symbolic name has given stateMask value. |
static void |
assertBundleState(String message,
int state,
String symbolicName,
org.osgi.framework.Version version)
Asserts that Bundle with symbolic name and version has given state value. |
static void |
assertBundleState(String message,
int stateMask,
String symbolicName,
org.osgi.framework.Version version,
long timeout,
TimeUnit timeUnit)
Asserts that Bundle with symbolic name has given stateMask value. |
static void |
assertBundleUnavailable(long bundleId)
Asserts that Bundle with bundleId is unavailable in OSGi framework. |
static void |
assertBundleUnavailable(String symbolicName)
Asserts that Bundle with symbolic name is unavailable in OSGi framework. |
static void |
assertBundleUnavailable(String message,
long bundleId)
Asserts that Bundle with bundleId is unavailable in OSGi framework. |
static void |
assertBundleUnavailable(String message,
String symbolicName)
Asserts that Bundle with symbolic name is unavailable in OSGi framework. |
static void |
assertBundleUnavailable(String message,
String symbolicName,
org.osgi.framework.Version version)
Asserts that Bundle with symbolic name and version is unavailable in OSGi framework. |
static void |
assertBundleUnavailable(String symbolicName,
org.osgi.framework.Version version)
Asserts that Bundle with symbolic name and version is unavailable in OSGi framework. |
static void |
assertFragment(long bundleId)
Asserts that Bundle with bundleId is fragment bundle. |
static void |
assertFragment(String symbolicName)
Asserts that Bundle with symbolic name is fragment bundle. |
static void |
assertFragment(String message,
long bundleId)
Asserts that Bundle with bundleId is fragment bundle. |
static void |
assertFragment(String message,
String symbolicName)
Asserts that Bundle with symbolic name is fragment bundle. |
static void |
assertFragment(String message,
String symbolicName,
org.osgi.framework.Version version)
Asserts that Bundle with symbolic name and version is fragment bundle. |
static void |
assertFragment(String symbolicName,
org.osgi.framework.Version version)
Asserts that Bundle with symbolic name and version is fragment bundle. |
static void |
assertNotFragment(long bundleId)
Asserts that Bundle with bundleId is not a fragment bundle. |
static void |
assertNotFragment(String symbolicName)
Asserts that Bundle with symbolic name is not a fragment bundle. |
static void |
assertNotFragment(String message,
long bundleId)
Asserts that Bundle with bundleId is not a fragment bundle. |
static void |
assertNotFragment(String message,
String symbolicName)
Asserts that Bundle with symbolic name is not a fragment bundle. |
static void |
assertNotFragment(String message,
String symbolicName,
org.osgi.framework.Version version)
Asserts that Bundle with symbolic name and version is not a fragment bundle. |
static void |
assertNotFragment(String symbolicName,
org.osgi.framework.Version version)
Asserts that Bundle with symbolic name and version is not a fragment bundle. |
| Methods inherited from class org.knowhowlab.osgi.testing.assertions.OSGiAssert |
|---|
getBundleContext, setDefaultBundleContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void assertBundleState(int state,
long bundleId)
AssertionError without a message is thrown
state - bundle state valuebundleId - bundle id
public static void assertBundleState(String message,
int state,
long bundleId)
AssertionError is thrown with the given message
message - messagestate - bundle state valuebundleId - bundle id
public static void assertBundleState(int state,
String symbolicName)
AssertionError without a message is thrown
state - bundle state valuesymbolicName - symbolic name
public static void assertBundleState(int state,
String symbolicName,
long timeoutInMillis)
AssertionError without a message is thrown
state - bundle state valuesymbolicName - symbolic nametimeoutInMillis - time interval to wait. If zero, the method will wait indefinitely.
public static void assertBundleState(String message,
int stateMask,
String symbolicName,
long timeoutInMillis)
AssertionError without a message is thrown
message - messagestateMask - The bit mask of the ORing of the bundle states to be tracked.symbolicName - symbolic nametimeoutInMillis - time interval to wait. If zero, the method will wait indefinitely.
public static void assertBundleState(String message,
int stateMask,
String symbolicName,
long timeout,
TimeUnit timeUnit)
AssertionError without a message is thrown
message - messagestateMask - The bit mask of the ORing of the bundle states to be tracked.symbolicName - symbolic nametimeout - time interval to wait. If zero, the method will wait indefinitely.timeUnit - timeout time unit
public static void assertBundleState(String message,
int state,
String symbolicName)
AssertionError is thrown with the given message
message - messagestate - bundle state valuesymbolicName - symbolic name
public static void assertBundleState(String message,
int stateMask,
String symbolicName,
org.osgi.framework.Version version,
long timeout,
TimeUnit timeUnit)
AssertionError is thrown with the given message
message - messagestateMask - The bit mask of the ORing of the bundle states to be tracked.symbolicName - symbolic nameversion - versiontimeout - time interval in milliseconds to wait. If zero, the method will wait indefinitely.timeUnit - timeout time unit
public static void assertBundleState(int state,
String symbolicName,
org.osgi.framework.Version version)
AssertionError without a message is thrown
state - bundle state valuesymbolicName - symbolic nameversion - version
public static void assertBundleState(int stateMask,
String symbolicName,
org.osgi.framework.Version version,
long timeout,
TimeUnit timeUnit)
AssertionError without a message is thrown
stateMask - The bit mask of the ORing of the bundle states to be tracked.symbolicName - symbolic nameversion - versiontimeout - time interval to wait. If zero, the method will wait indefinitely.timeUnit - timeout time unit
public static void assertBundleState(int stateMask,
String symbolicName,
long timeout,
TimeUnit timeUnit)
AssertionError without a message is thrown
stateMask - The bit mask of the ORing of the bundle states to be tracked.symbolicName - symbolic nametimeout - time interval to wait. If zero, the method will wait indefinitely.timeUnit - timeout time unit
public static void assertBundleState(String message,
int state,
String symbolicName,
org.osgi.framework.Version version)
AssertionError is thrown with the given message
message - messagestate - bundle state valuesymbolicName - symbolic nameversion - versionpublic static void assertBundleAvailable(long bundleId)
AssertionError without a message is thrown
bundleId - bundle id
public static void assertBundleAvailable(String message,
long bundleId)
AssertionError is thrown with the given message
message - messagebundleId - bundle idpublic static void assertBundleAvailable(String symbolicName)
AssertionError without a message is thrown
symbolicName - symbolic name
public static void assertBundleAvailable(String message,
String symbolicName)
AssertionError is thrown with the given message
message - messagesymbolicName - symbolic name
public static void assertBundleAvailable(String symbolicName,
org.osgi.framework.Version version)
AssertionError without a message is thrown
symbolicName - symbolic nameversion - version
public static void assertBundleAvailable(String message,
String symbolicName,
org.osgi.framework.Version version)
AssertionError is thrown with the given message
message - messagesymbolicName - symbolic nameversion - versionpublic static void assertBundleUnavailable(long bundleId)
AssertionError without a message is thrown
bundleId - bundle id
public static void assertBundleUnavailable(String message,
long bundleId)
AssertionError is thrown with the given message
message - messagebundleId - bundle idpublic static void assertBundleUnavailable(String symbolicName)
AssertionError without a message is thrown
symbolicName - symbolic name
public static void assertBundleUnavailable(String message,
String symbolicName)
AssertionError is thrown with the given message
message - messagesymbolicName - symbolic name
public static void assertBundleUnavailable(String symbolicName,
org.osgi.framework.Version version)
AssertionError without a message is thrown
symbolicName - symbolic nameversion - version
public static void assertBundleUnavailable(String message,
String symbolicName,
org.osgi.framework.Version version)
AssertionError is thrown with the given message
message - messagesymbolicName - symbolic nameversion - versionpublic static void assertFragment(long bundleId)
AssertionError without a message is thrown
bundleId - bundle id
public static void assertFragment(String message,
long bundleId)
AssertionError is thrown with the given message
message - messagebundleId - bundle idpublic static void assertFragment(String symbolicName)
AssertionError without a message is thrown
symbolicName - symbolic name
public static void assertFragment(String message,
String symbolicName)
AssertionError is thrown with the given message
message - messagesymbolicName - symbolic name
public static void assertFragment(String symbolicName,
org.osgi.framework.Version version)
AssertionError without a message is thrown
symbolicName - symbolic nameversion - version
public static void assertFragment(String message,
String symbolicName,
org.osgi.framework.Version version)
AssertionError is thrown with the given message
message - messagesymbolicName - symbolic nameversion - versionpublic static void assertNotFragment(long bundleId)
AssertionError without a message is thrown
bundleId - bundle id
public static void assertNotFragment(String message,
long bundleId)
AssertionError is thrown with the given message
message - messagebundleId - bundle idpublic static void assertNotFragment(String symbolicName)
AssertionError without a message is thrown
symbolicName - symbolic name
public static void assertNotFragment(String message,
String symbolicName)
AssertionError is thrown with the given message
message - messagesymbolicName - symbolic name
public static void assertNotFragment(String symbolicName,
org.osgi.framework.Version version)
AssertionError without a message is thrown
symbolicName - symbolic nameversion - version
public static void assertNotFragment(String message,
String symbolicName,
org.osgi.framework.Version version)
AssertionError is thrown with the given message
message - messagesymbolicName - symbolic nameversion - version
public static void assertBundleEvent(int eventTypeMask,
int bundleId,
long timeoutInMillis)
AssertionError is thrown
eventTypeMask - BundleEvent type maskbundleId - bundle idtimeoutInMillis - time interval in millis to wait. If zero, the method will wait indefinitely.
public static void assertBundleEvent(String message,
int eventTypeMask,
int bundleId,
long timeoutInMillis)
AssertionError is thrown with the given message
message - messageeventTypeMask - BundleEvent type maskbundleId - bundle idtimeoutInMillis - time interval in millis to wait. If zero, the method will wait indefinitely.
public static void assertBundleEvent(int eventTypeMask,
int bundleId,
long timeout,
TimeUnit timeUnit)
AssertionError is thrown
eventTypeMask - BundleEvent type maskbundleId - bundle idtimeout - time interval to wait. If zero, the method will wait indefinitely.timeUnit - time unit for the time interval
public static void assertBundleEvent(String message,
int eventTypeMask,
int bundleId,
long timeout,
TimeUnit timeUnit)
AssertionError is thrown with the given message
message - messageeventTypeMask - BundleEvent type maskbundleId - bundle idtimeout - time interval to wait. If zero, the method will wait indefinitely.timeUnit - time unit for the time interval
public static void assertBundleEvent(int eventTypeMask,
String symbolicName,
long timeoutInMillis)
AssertionError is thrown
eventTypeMask - BundleEvent type masksymbolicName - symbolicNametimeoutInMillis - time interval in millis to wait. If zero, the method will wait indefinitely.
public static void assertBundleEvent(String message,
int eventTypeMask,
String symbolicName,
long timeoutInMillis)
AssertionError is thrown with the given message
message - messageeventTypeMask - BundleEvent type masksymbolicName - symbolicNametimeoutInMillis - time interval in millis to wait. If zero, the method will wait indefinitely.
public static void assertBundleEvent(int eventTypeMask,
String symbolicName,
long timeout,
TimeUnit timeUnit)
AssertionError is thrown
eventTypeMask - BundleEvent type masksymbolicName - symbolicNametimeout - time interval to wait. If zero, the method will wait indefinitely.timeUnit - time unit for the time interval
public static void assertBundleEvent(String message,
int eventTypeMask,
String symbolicName,
long timeout,
TimeUnit timeUnit)
AssertionError is thrown with the given message
message - messageeventTypeMask - BundleEvent type masksymbolicName - symbolicNametimeout - time interval to wait. If zero, the method will wait indefinitely.timeUnit - time unit for the time interval
public static void assertBundleEvent(int eventTypeMask,
String symbolicName,
org.osgi.framework.Version version,
long timeoutInMillis)
AssertionError is thrown
eventTypeMask - BundleEvent type masksymbolicName - symbolicNameversion - versiontimeoutInMillis - time interval in millis to wait. If zero, the method will wait indefinitely.
public static void assertBundleEvent(String message,
int eventTypeMask,
String symbolicName,
org.osgi.framework.Version version,
long timeoutInMillis)
AssertionError is thrown with the given message
message - messageeventTypeMask - BundleEvent type masksymbolicName - symbolicNameversion - versiontimeoutInMillis - time interval in millis to wait. If zero, the method will wait indefinitely.
public static void assertBundleEvent(int eventTypeMask,
String symbolicName,
long timeout,
org.osgi.framework.Version version,
TimeUnit timeUnit)
AssertionError is thrown
eventTypeMask - BundleEvent type masksymbolicName - symbolicNameversion - versiontimeout - time interval to wait. If zero, the method will wait indefinitely.timeUnit - time unit for the time interval
public static void assertBundleEvent(String message,
int eventTypeMask,
String symbolicName,
org.osgi.framework.Version version,
long timeout,
TimeUnit timeUnit)
AssertionError is thrown with the given message
message - messageeventTypeMask - BundleEvent type masksymbolicName - symbolicNameversion - versiontimeout - time interval to wait. If zero, the method will wait indefinitely.timeUnit - time unit for the time interval
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||