类 ExpectedCount

java.lang.Object
cn.taketoday.test.web.client.ExpectedCount

public final class ExpectedCount extends Object
A simple type representing a range for an expected count.

Examples:

 import static cn.taketoday.test.web.client.ExpectedCount.*

 once()
 twice()
 manyTimes()
 times(5)
 min(2)
 max(4)
 between(2, 4)
 never()
 
从以下版本开始:
4.0
作者:
Rossen Stoyanchev
  • 字段详细资料

    • minCount

      private final int minCount
    • maxCount

      private final int maxCount
  • 构造器详细资料

    • ExpectedCount

      private ExpectedCount(int minCount, int maxCount)
      Private constructor. See static factory methods in this class.
  • 方法详细资料

    • getMinCount

      public int getMinCount()
      Return the min boundary of the expected count range.
    • getMaxCount

      public int getMaxCount()
      Return the max boundary of the expected count range.
    • once

      public static ExpectedCount once()
      Exactly once.
    • twice

      public static ExpectedCount twice()
      Exactly twice.
    • manyTimes

      public static ExpectedCount manyTimes()
      Many times (range of 1..Integer.MAX_VALUE).
    • times

      public static ExpectedCount times(int count)
      Exactly N times.
    • min

      public static ExpectedCount min(int min)
      At least min number of times.
    • max

      public static ExpectedCount max(int max)
      At most max number of times.
    • never

      public static ExpectedCount never()
      No calls expected at all, i.e. min=0 and max=0.
      从以下版本开始:
      4.0
    • between

      public static ExpectedCount between(int min, int max)
      Between min and max number of times.