org.mockito.internal.matchers.LessOrEqual Java Examples
The following examples show how to use
org.mockito.internal.matchers.LessOrEqual.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JavaxMailStorageTest.java From mail-importer with Apache License 2.0 | 6 votes |
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; }
Example #2
Source File: WordWrapLayoutIT.java From pentaho-reporting with GNU Lesser General Public License v2.1 | 5 votes |
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 ) ); } }
Example #3
Source File: AdditionalMatchers.java From astor with GNU General Public License v2.0 | 2 votes |
/** * 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(); }
Example #4
Source File: AdditionalMatchers.java From astor with GNU General Public License v2.0 | 2 votes |
/** * 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(); }
Example #5
Source File: AdditionalMatchers.java From astor with GNU General Public License v2.0 | 2 votes |
/** * 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(); }
Example #6
Source File: AdditionalMatchers.java From astor with GNU General Public License v2.0 | 2 votes |
/** * 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(); }
Example #7
Source File: AdditionalMatchers.java From astor with GNU General Public License v2.0 | 2 votes |
/** * 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(); }
Example #8
Source File: AdditionalMatchers.java From astor with GNU General Public License v2.0 | 2 votes |
/** * 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(); }
Example #9
Source File: AdditionalMatchers.java From astor with GNU General Public License v2.0 | 2 votes |
/** * 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(); }
Example #10
Source File: AdditionalMatchers.java From astor with GNU General Public License v2.0 | 2 votes |
/** * 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(); }
Example #11
Source File: AdditionalMatchers.java From astor with GNU General Public License v2.0 | 2 votes |
/** * 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(); }
Example #12
Source File: AdditionalMatchers.java From astor with GNU General Public License v2.0 | 2 votes |
/** * 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(); }
Example #13
Source File: AdditionalMatchers.java From astor with GNU General Public License v2.0 | 2 votes |
/** * 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(); }
Example #14
Source File: AdditionalMatchers.java From astor with GNU General Public License v2.0 | 2 votes |
/** * 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(); }
Example #15
Source File: AdditionalMatchers.java From astor with GNU General Public License v2.0 | 2 votes |
/** * 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(); }
Example #16
Source File: AdditionalMatchers.java From astor with GNU General Public License v2.0 | 2 votes |
/** * 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(); }