/** * Create a new {@link MockDataProvider} that always returns a single record * for all queries. */ public static final MockDataProvider of(int rows) { return of(new MockResult(rows, null)); }
/** * Create a new <code>MockResult</code>. * <p> * This is a convenience constructor creating a <code>MockResult</code> with exactly one record. * * @param data The single record in this result. * @see MockDataProvider <code>MockDataProvider</code> for details */ public MockResult(Record data) { this(1, Mock.result(data)); }
/** * Create a new {@link MockDataProvider} that always returns the same result * for all queries. */ public static final MockDataProvider of(Result<?> result) { return of(new MockResult(result.size(), result)); }