org.knowhowlab.osgi.testing.assertions.cmpn
Class EventAdminAssert

java.lang.Object
  extended by org.knowhowlab.osgi.testing.assertions.OSGiAssert
      extended by org.knowhowlab.osgi.testing.assertions.cmpn.EventAdminAssert

public class EventAdminAssert
extends OSGiAssert

A set of OSGi EventAdmin specific assertion methods useful for writing tests.

Before use it could be initialized with default BundleContext OSGiAssert.setDefaultBundleContext(org.osgi.framework.BundleContext)

Author:
dmytro.pishchukhin
See Also:
AssertionError, OSGiAssert

Method Summary
static void assertEvent(String[] topics, org.osgi.framework.Filter filter, long timeoutInMillis)
          Asserts that Event for defined topics and filter will be fired within given timeoutInMillis.
static void assertEvent(String[] topics, org.osgi.framework.Filter filter, long timeout, TimeUnit timeUnit)
          Asserts that Event for defined topics and filter will be fired within given timeout.
static void assertEvent(String[] topics, long timeoutInMillis)
          Asserts that Event for defined topics will be fired within given timeoutInMillis.
static void assertEvent(String[] topics, long timeout, TimeUnit timeUnit)
          Asserts that Event for defined topics will be fired within given timeout.
static void assertEvent(String topic, org.osgi.framework.Filter filter, long timeoutInMillis)
          Asserts that Event for defined topic and filter will be fired within given timeoutInMillis.
static void assertEvent(String topic, org.osgi.framework.Filter filter, long timeout, TimeUnit timeUnit)
          Asserts that Event for defined topic and filter will be fired within given timeout.
static void assertEvent(String topic, long timeoutInMillis)
          Asserts that Event for defined topic will be fired within given timeoutInMillis.
static void assertEvent(String topic, long timeout, TimeUnit timeUnit)
          Asserts that Event for defined topic will be fired within given timeout.
static void assertEvent(String message, String[] topics, org.osgi.framework.Filter filter, long timeoutInMillis)
          Asserts that Event for defined topics and filter will be fired within given timeoutInMillis.
static void assertEvent(String message, String[] topics, org.osgi.framework.Filter filter, long timeout, TimeUnit timeUnit)
          Asserts that Event for defined topics and filter will be fired within given timeout.
static void assertEvent(String message, String[] topics, long timeoutInMillis)
          Asserts that Event for defined topics will be fired within given timeoutInMillis.
static void assertEvent(String message, String[] topics, long timeout, TimeUnit timeUnit)
          Asserts that Event for defined topics will be fired within given timeout.
static void assertEvent(String message, String topic, org.osgi.framework.Filter filter, long timeoutInMillis)
          Asserts that Event for defined topic and filter will be fired within given timeoutInMillis.
static void assertEvent(String message, String topic, org.osgi.framework.Filter filter, long timeout, TimeUnit timeUnit)
          Asserts that Event for defined topic and filter will be fired within given timeout.
static void assertEvent(String message, String topic, long timeoutInMillis)
          Asserts that Event for defined topic will be fired within given timeoutInMillis.
static void assertEvent(String message, String topic, long timeout, TimeUnit timeUnit)
          Asserts that Event for defined topic will be fired within given timeout.
 
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

assertEvent

public static void assertEvent(String topic,
                               long timeoutInMillis)
Asserts that Event for defined topic will be fired within given timeoutInMillis. If it not as expected AssertionError is thrown

Parameters:
topic - topic
timeoutInMillis - time interval in millis to wait. If zero, the method will wait indefinitely.
Since:
1.0

assertEvent

public static void assertEvent(String message,
                               String topic,
                               long timeoutInMillis)
Asserts that Event for defined topic will be fired within given timeoutInMillis. If it not as expected AssertionError is thrown with the given message

Parameters:
message - message
topic - topic
timeoutInMillis - time interval in millis to wait. If zero, the method will wait indefinitely.
Since:
1.0

assertEvent

public static void assertEvent(String topic,
                               org.osgi.framework.Filter filter,
                               long timeoutInMillis)
Asserts that Event for defined topic and filter will be fired within given timeoutInMillis. If it not as expected AssertionError is thrown

Parameters:
topic - topic
filter - filter
timeoutInMillis - time interval in millis to wait. If zero, the method will wait indefinitely.
Since:
1.0

assertEvent

public static void assertEvent(String message,
                               String topic,
                               org.osgi.framework.Filter filter,
                               long timeoutInMillis)
Asserts that Event for defined topic and filter will be fired within given timeoutInMillis. If it not as expected AssertionError is thrown with the given message

Parameters:
message - message
topic - topic
filter - filter
timeoutInMillis - time interval in millis to wait. If zero, the method will wait indefinitely.
Since:
1.0

assertEvent

public static void assertEvent(String[] topics,
                               long timeoutInMillis)
Asserts that Event for defined topics will be fired within given timeoutInMillis. If it not as expected AssertionError is thrown

Parameters:
topics - topics
timeoutInMillis - time interval in millis to wait. If zero, the method will wait indefinitely.
Since:
1.0

assertEvent

public static void assertEvent(String message,
                               String[] topics,
                               long timeoutInMillis)
Asserts that Event for defined topics will be fired within given timeoutInMillis. If it not as expected AssertionError is thrown with the given message

Parameters:
message - message
topics - topics
timeoutInMillis - time interval in millis to wait. If zero, the method will wait indefinitely.
Since:
1.0

assertEvent

public static void assertEvent(String[] topics,
                               org.osgi.framework.Filter filter,
                               long timeoutInMillis)
Asserts that Event for defined topics and filter will be fired within given timeoutInMillis. If it not as expected AssertionError is thrown

Parameters:
topics - topics
filter - filter
timeoutInMillis - time interval in millis to wait. If zero, the method will wait indefinitely.
Since:
1.0

assertEvent

public static void assertEvent(String message,
                               String[] topics,
                               org.osgi.framework.Filter filter,
                               long timeoutInMillis)
Asserts that Event for defined topics and filter will be fired within given timeoutInMillis. If it not as expected AssertionError is thrown with the given message

Parameters:
message - message
topics - topics
filter - filter
timeoutInMillis - time interval in millis to wait. If zero, the method will wait indefinitely.
Since:
1.0

assertEvent

public static void assertEvent(String topic,
                               long timeout,
                               TimeUnit timeUnit)
Asserts that Event for defined topic will be fired within given timeout. If it not as expected AssertionError is thrown

Parameters:
topic - topic
timeout - time interval to wait. If zero, the method will wait indefinitely.
timeUnit - time unit for the time interval
Since:
1.0

assertEvent

public static void assertEvent(String message,
                               String topic,
                               long timeout,
                               TimeUnit timeUnit)
Asserts that Event for defined topic will be fired within given timeout. If it not as expected AssertionError is thrown with the given message

Parameters:
message - message
topic - topic
timeout - time interval to wait. If zero, the method will wait indefinitely.
timeUnit - time unit for the time interval
Since:
1.0

assertEvent

public static void assertEvent(String topic,
                               org.osgi.framework.Filter filter,
                               long timeout,
                               TimeUnit timeUnit)
Asserts that Event for defined topic and filter will be fired within given timeout. If it not as expected AssertionError is thrown

Parameters:
topic - topic
filter - filter
timeout - time interval to wait. If zero, the method will wait indefinitely.
timeUnit - time unit for the time interval
Since:
1.0

assertEvent

public static void assertEvent(String message,
                               String topic,
                               org.osgi.framework.Filter filter,
                               long timeout,
                               TimeUnit timeUnit)
Asserts that Event for defined topic and filter will be fired within given timeout. If it not as expected AssertionError is thrown with the given message

Parameters:
message - message
topic - topic
filter - filter
timeout - time interval to wait. If zero, the method will wait indefinitely.
timeUnit - time unit for the time interval
Since:
1.0

assertEvent

public static void assertEvent(String[] topics,
                               long timeout,
                               TimeUnit timeUnit)
Asserts that Event for defined topics will be fired within given timeout. If it not as expected AssertionError is thrown

Parameters:
topics - topics
timeout - time interval to wait. If zero, the method will wait indefinitely.
timeUnit - time unit for the time interval
Since:
1.0

assertEvent

public static void assertEvent(String message,
                               String[] topics,
                               long timeout,
                               TimeUnit timeUnit)
Asserts that Event for defined topics will be fired within given timeout. If it not as expected AssertionError is thrown with the given message

Parameters:
message - message
topics - topics
timeout - time interval to wait. If zero, the method will wait indefinitely.
timeUnit - time unit for the time interval
Since:
1.0

assertEvent

public static void assertEvent(String[] topics,
                               org.osgi.framework.Filter filter,
                               long timeout,
                               TimeUnit timeUnit)
Asserts that Event for defined topics and filter will be fired within given timeout. If it not as expected AssertionError is thrown

Parameters:
topics - topics
filter - filter
timeout - time interval to wait. If zero, the method will wait indefinitely.
timeUnit - time unit for the time interval
Since:
1.0

assertEvent

public static void assertEvent(String message,
                               String[] topics,
                               org.osgi.framework.Filter filter,
                               long timeout,
                               TimeUnit timeUnit)
Asserts that Event for defined topics and filter will be fired within given timeout. If it not as expected AssertionError is thrown with the given message

Parameters:
message - message
topics - topics
filter - filter
timeout - time interval to wait. If zero, the method will wait indefinitely.
timeUnit - time unit for the time interval
Since:
1.0


Copyright © 2013 Know-How Lab. All Rights Reserved.