类org.mockito.internal.matchers.LessOrEqual源码实例Demo

下面列出了怎么用org.mockito.internal.matchers.LessOrEqual的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: mail-importer   文件: JavaxMailStorageTest.java
private JavaxMailFolder makeMockFolderWithMessages(int numMessages,
    JavaxMailFolder... folders) {
  JavaxMailFolder javaxMailFolder = mock(JavaxMailFolder.class);

  when(javaxMailFolder.getType())
      .thenReturn(Folder.HOLDS_FOLDERS | Folder.HOLDS_MESSAGES);

  when(javaxMailFolder.getMessageCount())
      .thenReturn(numMessages);
  when(javaxMailFolder.getMessage(Matchers.intThat(new LessOrEqual<>(numMessages))))
      .thenReturn(mock(JavaxMailMessage.class));
  when(javaxMailFolder.getMessage(Matchers.intThat(new GreaterThan<>(numMessages))))
      .thenThrow(new RuntimeMessagingException(
          new MessagingException("crap")));

  when(javaxMailFolder.list()).thenReturn(folders);
  return javaxMailFolder;
}
 
源代码2 项目: pentaho-reporting   文件: WordWrapLayoutIT.java
private void assertTextNodesLayInsideBoxBounds( RenderBox box, List<RenderableText> texts ) {
  assertFalse( texts.isEmpty() );

  GreaterOrEqual<Long> greaterThanBoxX = new GreaterOrEqual<Long>( box.getX() );
  LessOrEqual<Long> lessThanBoxWidth = new LessOrEqual<Long>( box.getWidth() );
  for ( RenderableText text : texts ) {
    assertThat( text.getX(), is( greaterThanBoxX ) );
    assertThat( text.getWidth(), is( lessThanBoxWidth ) );
  }
}
 
源代码3 项目: astor   文件: AdditionalMatchers.java
/**
 * comparable argument less than or equal the given value details.
 * <p>
 * See examples in javadoc for {@link AdditionalMatchers} class
 * 
 * @param value
 *            the given value.
 * @return <code>null</code>.
 */
public static <T extends Comparable<T>> T leq(Comparable<T> value) {
    return reportMatcher(new LessOrEqual<T>(value)).<T>returnNull();
}
 
源代码4 项目: astor   文件: AdditionalMatchers.java
/**
 * byte argument less than or equal to the given value.
 * <p>
 * See examples in javadoc for {@link AdditionalMatchers} class
 * 
 * @param value
 *            the given value.
 * @return <code>0</code>.
 */
public static byte leq(byte value) {
    return reportMatcher(new LessOrEqual<Byte>(value)).returnZero();
}
 
源代码5 项目: astor   文件: AdditionalMatchers.java
/**
 * double argument less than or equal to the given value.
 * <p>
 * See examples in javadoc for {@link AdditionalMatchers} class
 * 
 * @param value
 *            the given value.
 * @return <code>0</code>.
 */
public static double leq(double value) {
    return reportMatcher(new LessOrEqual<Double>(value)).returnZero();
}
 
源代码6 项目: astor   文件: AdditionalMatchers.java
/**
 * float argument less than or equal to the given value.
 * <p>
 * See examples in javadoc for {@link AdditionalMatchers} class
 * 
 * @param value
 *            the given value.
 * @return <code>0</code>.
 */
public static float leq(float value) {
    return reportMatcher(new LessOrEqual<Float>(value)).returnZero();
}
 
源代码7 项目: astor   文件: AdditionalMatchers.java
/**
 * int argument less than or equal to the given value.
 * <p>
 * See examples in javadoc for {@link AdditionalMatchers} class
 * 
 * @param value
 *            the given value.
 * @return <code>0</code>.
 */
public static int leq(int value) {
    return reportMatcher(new LessOrEqual<Integer>(value)).returnZero();
}
 
源代码8 项目: astor   文件: AdditionalMatchers.java
/**
 * long argument less than or equal to the given value.
 * <p>
 * See examples in javadoc for {@link AdditionalMatchers} class
 * 
 * @param value
 *            the given value.
 * @return <code>0</code>.
 */
public static long leq(long value) {
    return reportMatcher(new LessOrEqual<Long>(value)).returnZero();
}
 
源代码9 项目: astor   文件: AdditionalMatchers.java
/**
 * short argument less than or equal to the given value.
 * <p>
 * See examples in javadoc for {@link AdditionalMatchers} class 
 * 
 * @param value
 *            the given value.
 * @return <code>0</code>.
 */
public static short leq(short value) {
    return reportMatcher(new LessOrEqual<Short>(value)).returnZero();
}
 
源代码10 项目: astor   文件: AdditionalMatchers.java
/**
 * comparable argument less than or equal the given value details.
 * <p>
 * See examples in javadoc for {@link AdditionalMatchers} class
 * 
 * @param value
 *            the given value.
 * @return <code>null</code>.
 */
public static <T extends Comparable<T>> T leq(Comparable<T> value) {
    return reportMatcher(new LessOrEqual<T>(value)).<T>returnNull();
}
 
源代码11 项目: astor   文件: AdditionalMatchers.java
/**
 * byte argument less than or equal to the given value.
 * <p>
 * See examples in javadoc for {@link AdditionalMatchers} class
 * 
 * @param value
 *            the given value.
 * @return <code>0</code>.
 */
public static byte leq(byte value) {
    return reportMatcher(new LessOrEqual<Byte>(value)).returnZero();
}
 
源代码12 项目: astor   文件: AdditionalMatchers.java
/**
 * double argument less than or equal to the given value.
 * <p>
 * See examples in javadoc for {@link AdditionalMatchers} class
 * 
 * @param value
 *            the given value.
 * @return <code>0</code>.
 */
public static double leq(double value) {
    return reportMatcher(new LessOrEqual<Double>(value)).returnZero();
}
 
源代码13 项目: astor   文件: AdditionalMatchers.java
/**
 * float argument less than or equal to the given value.
 * <p>
 * See examples in javadoc for {@link AdditionalMatchers} class
 * 
 * @param value
 *            the given value.
 * @return <code>0</code>.
 */
public static float leq(float value) {
    return reportMatcher(new LessOrEqual<Float>(value)).returnZero();
}
 
源代码14 项目: astor   文件: AdditionalMatchers.java
/**
 * int argument less than or equal to the given value.
 * <p>
 * See examples in javadoc for {@link AdditionalMatchers} class
 * 
 * @param value
 *            the given value.
 * @return <code>0</code>.
 */
public static int leq(int value) {
    return reportMatcher(new LessOrEqual<Integer>(value)).returnZero();
}
 
源代码15 项目: astor   文件: AdditionalMatchers.java
/**
 * long argument less than or equal to the given value.
 * <p>
 * See examples in javadoc for {@link AdditionalMatchers} class
 * 
 * @param value
 *            the given value.
 * @return <code>0</code>.
 */
public static long leq(long value) {
    return reportMatcher(new LessOrEqual<Long>(value)).returnZero();
}
 
源代码16 项目: astor   文件: AdditionalMatchers.java
/**
 * short argument less than or equal to the given value.
 * <p>
 * See examples in javadoc for {@link AdditionalMatchers} class 
 * 
 * @param value
 *            the given value.
 * @return <code>0</code>.
 */
public static short leq(short value) {
    return reportMatcher(new LessOrEqual<Short>(value)).returnZero();
}
 
 类所在包
 同包方法