com.google.cloud.dataflow.sdk.testing

## Interface DataflowAssert.SingletonAssert<T>

Enclosing class:
  DataflowAssert

    public static interface DataflowAssert.SingletonAssert<T>

Builder interface for assertions applicable to a single value.

### Method Summary

All Methods Instance Methods Abstract Methods Deprecated Methods
`Coder<T>` `getCoder()` Deprecated. instead call `PCollection.getCoder()` on the actual `PCollection` directly
`DataflowAssert.SingletonAssert<T>` `inFinalPane(BoundedWindow window)` Creates a new `DataflowAssert.SingletonAssert` like this one, but with the assertion restricted to only run on the provided window, running the checker only on the final pane for each key.
`DataflowAssert.SingletonAssert<T>` `inOnlyPane(BoundedWindow window)` Creates a new `DataflowAssert.SingletonAssert` like this one, but with the assertion restricted to only run on the provided window.
`DataflowAssert.SingletonAssert<T>` `inOnTimePane(BoundedWindow window)` Creates a new `DataflowAssert.SingletonAssert` like this one, but with the assertion restricted to only run on the provided window, running the checker only on the on-time pane for each key.
`DataflowAssert.SingletonAssert<T>` `is(T expected)` Deprecated. instead use `isEqualTo(Object)`
`DataflowAssert.SingletonAssert<T>` `isEqualTo(T expected)` Asserts that the value in question is equal to the provided value, according to `Object.equals(java.lang.Object)`.
`DataflowAssert.SingletonAssert<T>` `notEqualTo(T notExpected)` Asserts that the value in question is not equal to the provided value, according to `Object.equals(java.lang.Object)`.
`DataflowAssert.SingletonAssert<T>` `satisfies(SerializableFunction<T,Void> checkerFn)` Applies the provided checking function (presumably containing assertions) to the value in question.
`DataflowAssert.SingletonAssert<T>` `setCoder(Coder<T> coderOrNull)` Deprecated. instead call `PCollection.setCoder(Coder)` on the actual `PCollection` directly.

### Method Detail

#### setCoder

    @Deprecated
    DataflowAssert.SingletonAssert<T> setCoder(Coder<T> coderOrNull)

Deprecated. instead call `PCollection.setCoder(Coder)` on the actual `PCollection` directly.
Sets the coder of the actual `PCollection`.

Returns:
  the same `DataflowAssert.IterableAssert` builder for further assertions

#### getCoder

    @Deprecated
    Coder<T> getCoder()

Deprecated. instead call `PCollection.getCoder()` on the actual `PCollection` directly
Returns the coder of the actual `PCollection`.

#### inOnlyPane

    DataflowAssert.SingletonAssert<T> inOnlyPane(BoundedWindow window)

Creates a new `DataflowAssert.SingletonAssert` like this one, but with the assertion restricted to only run on the provided window.

The assertion will expect outputs to be produced to the provided window exactly once. If the upstream `Trigger` may produce output multiple times, consider instead using `inFinalPane(BoundedWindow)` or `inOnTimePane(BoundedWindow)`.

Returns:
  a new `DataflowAssert.SingletonAssert` like this one but with the assertion only applied to the specified window.

#### inFinalPane

    DataflowAssert.SingletonAssert<T> inFinalPane(BoundedWindow window)

Creates a new `DataflowAssert.SingletonAssert` like this one, but with the assertion restricted to only run on the provided window, running the checker only on the final pane for each key.

If the input `WindowingStrategy` does not always produce final panes, the assertion may be executed over an empty input even if the trigger has fired previously. To ensure that a final pane is always produced, set the `ClosingBehavior` of the windowing strategy (via `Window.Bound#withAllowedLateness(Duration, ClosingBehavior)` setting `ClosingBehavior` to `ClosingBehavior#FIRE_ALWAYS`).

Returns:
  a new `DataflowAssert.SingletonAssert` like this one but with the assertion only applied to the specified window.

#### inOnTimePane

    DataflowAssert.SingletonAssert<T> inOnTimePane(BoundedWindow window)

Creates a new `DataflowAssert.SingletonAssert` like this one, but with the assertion restricted to only run on the provided window, running the checker only on the on-time pane for each key.

Returns:
  a new `DataflowAssert.SingletonAssert` like this one but with the assertion only applied to the specified window.

#### isEqualTo

    DataflowAssert.SingletonAssert<T> isEqualTo(T expected)

Asserts that the value in question is equal to the provided value, according to `Object.equals(java.lang.Object)`.

Returns:
  the same `DataflowAssert.SingletonAssert` builder for further assertions

#### is

    @Deprecated
    DataflowAssert.SingletonAssert<T> is(T expected)

Deprecated. instead use `isEqualTo(Object)`
Asserts that the value in question is equal to the provided value, according to `Object.equals(java.lang.Object)`.

Returns:
  the same `DataflowAssert.SingletonAssert` builder for further assertions

#### notEqualTo

    DataflowAssert.SingletonAssert<T> notEqualTo(T notExpected)

Asserts that the value in question is not equal to the provided value, according to `Object.equals(java.lang.Object)`.

Returns:
  the same `DataflowAssert.SingletonAssert` builder for further assertions

#### satisfies

    DataflowAssert.SingletonAssert<T> satisfies(SerializableFunction<T,Void> checkerFn)

Applies the provided checking function (presumably containing assertions) to the value in question.

Returns:
  the same `DataflowAssert.SingletonAssert` builder for further assertions