クラス LatchCountDownAndCallRealMethodAnswer

  • 実装されたすべてのインターフェース:
    SerializableSEorg.mockito.stubbing.Answer<ObjectSE>

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

      • 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