FlowTestsUtilsKt
Keywords: net.corda.testing.flows.FlowTestsUtilsKt class
Date: 2023-09-18

net.corda.testing.flows

## Class FlowTestsUtilsKt

- net.corda.testing.flows.FlowTestsUtilsKt

-     public class FlowTestsUtilsKt

- - ### Constructor Detail

    - #### FlowTestsUtilsKt

          public FlowTestsUtilsKt()

  - ### Method Detail

    - #### from

          @NotNull
          public static <R> R from(@NotNull
                                            java.util.Map<net.corda.core.flows.FlowSession,? extends net.corda.core.utilities.UntrustworthyData<? extends java.lang.Object>> $this$from,
                                            @NotNull
                                            FlowSession session)

      Extracts data from a [MapFlowSession,UntrustworthyData] without performing checks and casting to R.

      See Also:
        FlowSession,UntrustworthyData

    - #### from

          @NotNull
          public static <T extends Class<? extends java.lang.Object>> kotlin.Pair<net.corda.core.flows.FlowSession,T> from(@NotNull
                                                                                                                                    T $this$from,
                                                                                                                                    @NotNull
                                                                                                                                    FlowSession session)

      Creates a [Pair(`session`, Class)] from this Class.

      See Also:
        `session`, Class, Class

    - #### from

          @NotNull
          public static <T> kotlin.Pair<net.corda.core.flows.FlowSession,java.lang.Class> from(@NotNull
                                                                                                        kotlin.reflect.KClass<T> $this$from,
                                                                                                        @NotNull
                                                                                                        FlowSession session)

      Creates a [Pair(`session`, Class)] from this KClass.

      See Also:
        `session`, Class, KClass

    - #### receiveAll

          @Suspendable
           @NotNull
          public static java.util.Map<net.corda.core.flows.FlowSession,net.corda.core.utilities.UntrustworthyData> receiveAll(@NotNull
                                                                                                                                                     FlowLogic<?> $this$receiveAll,
                                                                                                                                                     @NotNull
                                                                                                                                                     kotlin.Pair<? extends net.corda.core.flows.FlowSession,? extends java.lang.Class<? extends java.lang.Object>> session,
                                                                                                                                                     @NotNull
                                                                                                                                                     kotlin.Pair... sessions)

      Suspends until a message has been received for each session in the specified `sessions`.

      Consider receiveAllreceiveType:Class,sessions:List:ListUntrustworthyData when the same type is expected from all sessions.

      Remember that when receiving data from other parties the data should not be trusted until it's been thoroughly verified for consistency and that all expectations are satisfied, as a malicious peer may send you subtly corrupted data in order to exploit your code.

      See Also:
        `sessions`, receiveAllreceiveType:Class,sessions:List:ListUntrustworthyData

    - #### receiveAll

          @Suspendable
           @NotNull
          public static <R> java.util.List<net.corda.core.utilities.UntrustworthyData> receiveAll(@NotNull
                                                                                                                         FlowLogic<?> $this$receiveAll,
                                                                                                                         @NotNull
                                                                                                                         java.lang.Class<R> receiveType,
                                                                                                                         @NotNull
                                                                                                                         FlowSession session,
                                                                                                                         @NotNull
                                                                                                                         net.corda.core.flows.FlowSession... sessions)

      Suspends until a message has been received for each session in the specified `sessions`.

      Consider sessions:MapFlowSession,Class:MapFlowSession,UntrustworthyData when sessions are expected to receive different types.

      Remember that when receiving data from other parties the data should not be trusted until it's been thoroughly verified for consistency and that all expectations are satisfied, as a malicious peer may send you subtly corrupted data in order to exploit your code.

      See Also:
        `sessions`, sessions:MapFlowSession,Class:MapFlowSession,UntrustworthyData

    - #### registerCoreFlowFactory

          @NotNull
          public static <T extends FlowLogic<?>> rx.Observable<T> registerCoreFlowFactory(@NotNull
                                                                                                   net.corda.testing.node.internal.TestStartedNode $this$registerCoreFlowFactory,
                                                                                                   @NotNull
                                                                                                   java.lang.Class<? extends net.corda.core.flows.FlowLogic<?>> initiatingFlowClass,
                                                                                                   @NotNull
                                                                                                   java.lang.Class<T> initiatedFlowClass,
                                                                                                   @NotNull
                                                                                                   kotlin.jvm.functions.Function1<? super net.corda.core.flows.FlowSession,? extends T> flowFactory,
                                                                                                   boolean track)