クラス LatchCountDownAndCallRealMethodAnswer

java.lang.ObjectSE
org.mockito.internal.stubbing.defaultanswers.ForwardsInvocations
org.springframework.amqp.rabbit.test.mockito.LatchCountDownAndCallRealMethodAnswer
実装されたすべてのインターフェース:
SerializableSEorg.mockito.stubbing.Answer<ObjectSE>

public class LatchCountDownAndCallRealMethodAnswer extends org.mockito.internal.stubbing.defaultanswers.ForwardsInvocations
実メソッドを呼び出してラッチをカウントダウンする void を返すメソッドの Answer。スローされたすべての例外をキャプチャーします。
導入:
1.6
作成者:
Gary Russell, Artem Bilan
関連事項:
  • コンストラクターの詳細

    • LatchCountDownAndCallRealMethodAnswer

      public LatchCountDownAndCallRealMethodAnswer(int count, @Nullable ObjectSE delegate)
      指定されたプロパティを持つインスタンスを取得します。テストハーネスを使用して、適切なデリゲートを持つインスタンスを取得します。
      パラメーター:
      count - カウント。
      delegate - 代表者。
      導入:
      2.1.16
  • メソッドの詳細

    • answer

      public ObjectSE answer(org.mockito.invocation.InvocationOnMock invocation) throws ThrowableSE
      次で指定:
      インターフェース org.mockito.stubbing.Answer<ObjectSE>answer 
      オーバーライド:
      クラス org.mockito.internal.stubbing.defaultanswers.ForwardsInvocationsanswer 
      例外:
      ThrowableSE
    • await

      public boolean await(int timeout) throws InterruptedExceptionSE
      ラッチがカウントダウンするまで待ちます。
      パラメーター:
      timeout - 秒単位のタイムアウト。
      戻り値:
      ラッチで待機した結果。カウントダウンする場合は true。
      例外:
      InterruptedExceptionSE - スレッドが中断された場合。
      導入:
      2.1.16
    • getLatch

      public CountDownLatchSE getLatch()
    • getExceptions

      @Nullable public CollectionSE<ExceptionSE> getExceptions()
      スローされた例外を返します。
      戻り値:
      例外。
      導入:
      2.2.3