io.vertx.rxjava.ext.unit

## Class TestContext

- java.lang.Object
- - io.vertx.rxjava.ext.unit.TestContext

-     public class TestContext
      extends Object

  The test context is used for performing test assertions and manage the completion of the test. This context is provided by vertx-unit as argument of the test case.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TestContext(TestContext delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TestContext` | `assertEquals(Object expected, Object actual)` Assert the `expected` argument is equals to the `actual` argument.
    `TestContext` | `assertEquals(Object expected, Object actual, String message)` Assert the `expected` argument is equals to the `actual` argument.
    `TestContext` | `assertFalse(boolean condition)` Assert the specified `condition` is `false`.
    `TestContext` | `assertFalse(boolean condition, String message)` Assert the specified `condition` is `false`.
    `TestContext` | `assertInRange(double expected, double actual, double delta)` Asserts that the `expected` double argument is equals to the `actual` double argument within a positive delta.
    `TestContext` | `assertInRange(double expected, double actual, double delta, String message)` Asserts that the `expected` double argument is equals to the `actual` double argument within a positive delta.
    `TestContext` | `assertNotEquals(Object first, Object second)` Assert the `first` argument is not equals to the `second` argument.
    `TestContext` | `assertNotEquals(Object first, Object second, String message)` Assert the `first` argument is not equals to the `second` argument.
    `TestContext` | `assertNotNull(Object expected)` Assert the `expected` argument is not `null`.
    `TestContext` | `assertNotNull(Object expected, String message)` Assert the `expected` argument is not `null`.
    `TestContext` | `assertNull(Object expected)` Assert the `expected` argument is `null`.
    `TestContext` | `assertNull(Object expected, String message)` Assert the `expected` argument is `null`.
    `TestContext` | `assertTrue(boolean condition)` Assert the specified `condition` is `true`.
    `TestContext` | `assertTrue(boolean condition, String message)` Assert the specified `condition` is `true`.
    `Async` | `async()` Create and returns a new async object, the returned async controls the completion of the test.
    `void` | `fail()` Throw a failure.
    `void` | `fail(String message)` Throw a failure with the specified failure `message`.
    `void` | `fail(Throwable cause)` Throw a failure with the specified failure `cause`.
    `<T> T` | `get(String key)` Get some data from the context.
    `Object` | `getDelegate()`
    `static TestContext` | `newInstance(TestContext arg)`
    `<T> T` | `put(String key, Object value)` Put some data in the context.
    `<T> T` | `remove(String key)` Remove some data from the context.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TestContext

          public TestContext(TestContext delegate)

  - ### Method Detail

    - #### getDelegate

          public Object getDelegate()

    - #### get

          public <T> T get(String key)

      Get some data from the context.
      Parameters:
        `key` - the key of the data
      Returns:
        the data

    - #### put

          public <T> T put(String key,
                           Object value)

      Put some data in the context.

      This can be used to share data between different tests and before/after phases.

      Parameters:
        `key` - the key of the data
        `value` - the data
      Returns:
        the previous object when it exists

    - #### remove

          public <T> T remove(String key)

      Remove some data from the context.
      Parameters:
        `key` - the key to remove
      Returns:
        the removed object when it exists

    - #### assertNull

          public TestContext assertNull(Object expected)

      Assert the `expected` argument is `null`. If the argument is not, an assertion error is thrown otherwise the execution continue.
      Parameters:
        `expected` - the argument being asserted to be null
      Returns:
        a reference to this, so the API can be used fluently

    - #### assertNull

          public TestContext assertNull(Object expected,
                                        String message)

      Assert the `expected` argument is `null`. If the argument is not, an assertion error is thrown otherwise the execution continue.
      Parameters:
        `expected` - the argument being asserted to be null
        `message` - the failure message
      Returns:
        a reference to this, so the API can be used fluently

    - #### assertNotNull

          public TestContext assertNotNull(Object expected)

      Assert the `expected` argument is not `null`. If the argument is `null`, an assertion error is thrown otherwise the execution continue.
      Parameters:
        `expected` - the argument being asserted to be not null
      Returns:
        a reference to this, so the API can be used fluently

    - #### assertNotNull

          public TestContext assertNotNull(Object expected,
                                           String message)

      Assert the `expected` argument is not `null`. If the argument is `null`, an assertion error is thrown otherwise the execution continue.
      Parameters:
        `expected` - the argument being asserted to be not null
        `message` - the failure message
      Returns:
        a reference to this, so the API can be used fluently

    - #### assertTrue

          public TestContext assertTrue(boolean condition)

      Assert the specified `condition` is `true`. If the condition is `false`, an assertion error is thrown otherwise the execution continue.
      Parameters:
        `condition` - the condition to assert
      Returns:
        a reference to this, so the API can be used fluently

    - #### assertTrue

          public TestContext assertTrue(boolean condition,
                                        String message)

      Assert the specified `condition` is `true`. If the condition is `false`, an assertion error is thrown otherwise the execution continue.
      Parameters:
        `condition` - the condition to assert
        `message` - the failure message
      Returns:
        a reference to this, so the API can be used fluently

    - #### assertFalse

          public TestContext assertFalse(boolean condition)

      Assert the specified `condition` is `false`. If the condition is `true`, an assertion error is thrown otherwise the execution continue.
      Parameters:
        `condition` - the condition to assert
      Returns:
        a reference to this, so the API can be used fluently

    - #### assertFalse

          public TestContext assertFalse(boolean condition,
                                         String message)

      Assert the specified `condition` is `false`. If the condition is `true`, an assertion error is thrown otherwise the execution continue.
      Parameters:
        `condition` - the condition to assert
        `message` - the failure message
      Returns:
        a reference to this, so the API can be used fluently

    - #### assertEquals

          public TestContext assertEquals(Object expected,
                                          Object actual)

      Assert the `expected` argument is equals to the `actual` argument. If the arguments are not equals an assertion error is thrown otherwise the execution continue.
      Parameters:
        `expected` - the object the actual object is supposedly equals to
        `actual` - the actual object to test
      Returns:
        a reference to this, so the API can be used fluently

    - #### assertEquals

          public TestContext assertEquals(Object expected,
                                          Object actual,
                                          String message)

      Assert the `expected` argument is equals to the `actual` argument. If the arguments are not equals an assertion error is thrown otherwise the execution continue.
      Parameters:
        `expected` - the object the actual object is supposedly equals to
        `actual` - the actual object to test
        `message` - the failure message
      Returns:
        a reference to this, so the API can be used fluently

    - #### assertInRange

          public TestContext assertInRange(double expected,
                                           double actual,
                                           double delta)

      Asserts that the `expected` double argument is equals to the `actual` double argument within a positive delta. If the arguments do not satisfy this, an assertion error is thrown otherwise the execution continue.
      Parameters:
        `expected` - the object the actual object is supposedly equals to
        `actual` - the actual object to test
        `delta` - the maximum delta
      Returns:
        a reference to this, so the API can be used fluently

    - #### assertInRange

          public TestContext assertInRange(double expected,
                                           double actual,
                                           double delta,
                                           String message)

      Asserts that the `expected` double argument is equals to the `actual` double argument within a positive delta. If the arguments do not satisfy this, an assertion error is thrown otherwise the execution continue.
      Parameters:
        `expected` - the object the actual object is supposedly equals to
        `actual` - the actual object to test
        `delta` - the maximum delta
        `message` - the failure message
      Returns:
        a reference to this, so the API can be used fluently

    - #### assertNotEquals

          public TestContext assertNotEquals(Object first,
                                             Object second)

      Assert the `first` argument is not equals to the `second` argument. If the arguments are equals an assertion error is thrown otherwise the execution continue.
      Parameters:
        `first` - the first object to test
        `second` - the second object to test
      Returns:
        a reference to this, so the API can be used fluently

    - #### assertNotEquals

          public TestContext assertNotEquals(Object first,
                                             Object second,
                                             String message)

      Assert the `first` argument is not equals to the `second` argument. If the arguments are equals an assertion error is thrown otherwise the execution continue.
      Parameters:
        `first` - the first object to test
        `second` - the second object to test
        `message` - the failure message
      Returns:
        a reference to this, so the API can be used fluently

    - #### fail

          public void fail()

      Throw a failure.

    - #### fail

          public void fail(String message)

      Throw a failure with the specified failure `message`.
      Parameters:
        `message` - the failure message

    - #### fail

          public void fail(Throwable cause)

      Throw a failure with the specified failure `cause`.
      Parameters:
        `cause` - the failure cause

    - #### async

          public Async async()

      Create and returns a new async object, the returned async controls the completion of the test. Calling the `Async` completes the async operation.

      The test case will complete when all the async objects have their `Async` method called at least once.

      This method shall be used for creating asynchronous exit points for the executed test.
      Returns:
        the async instance

    - #### newInstance

          public static TestContext newInstance(TestContext arg)

Copyright © 2015. All rights reserved.