Interface PolicyOpsTestKit<P>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void failNextNOps​(int n)
      Fail n following journal operations regardless of their type.
      void failNextNOps​(int n, java.lang.Throwable cause)
      Fail n following journal operations regardless of their type.
      void failNextNOpsCond​(scala.Function2<java.lang.String,​P,​java.lang.Object> cond, int n)
      Fail n following journal operations depending on the condition cond.
      void failNextNOpsCond​(scala.Function2<java.lang.String,​P,​java.lang.Object> cond, int n, java.lang.Throwable cause)
      Fail n following journal operations depending on the condition cond.
      ProcessingPolicy.DefaultPolicies<P> Policies()  
      void resetPolicy()
      Returns default policy if it was changed by {@link PolicyOpsTestKit.this.withPolicy()}.
      PolicyOpsTestKit<P> withPolicy​(ProcessingPolicy<P> policy)
      Set new processing policy for journal operations.
    • Method Detail

      • failNextNOps

        void failNextNOps​(int n)
        Fail n following journal operations regardless of their type. Fails operations with default ExpectedFailure exception.
      • failNextNOps

        void failNextNOps​(int n,
                          java.lang.Throwable cause)
        Fail n following journal operations regardless of their type. Fails operations with the cause exception.
      • failNextNOpsCond

        void failNextNOpsCond​(scala.Function2<java.lang.String,​P,​java.lang.Object> cond,
                              int n)
        Fail n following journal operations depending on the condition cond. Failure triggers, when cond returns true. Fails operations with default ExpectedFailure exception.
      • failNextNOpsCond

        void failNextNOpsCond​(scala.Function2<java.lang.String,​P,​java.lang.Object> cond,
                              int n,
                              java.lang.Throwable cause)
        Fail n following journal operations depending on the condition cond. Failure triggers, when cond returns true. Fails operations with the cause exception.
      • resetPolicy

        void resetPolicy()
        Returns default policy if it was changed by {@link PolicyOpsTestKit.this.withPolicy()}.
      • withPolicy

        PolicyOpsTestKit<P> withPolicy​(ProcessingPolicy<P> policy)
        Set new processing policy for journal operations. NOTE! Overrides previously invoked failNext... or rejectNext...