mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-22 15:10:02 +00:00
Refactor move tests from ebean-core to ebean-test
This commit is contained in:
1 parent
0b00a14fd3
commit
eab56d323b
1650 files changed
+185
-147
No files matched your search
@@ -0,0 +1,42 @@
|
||||
package io.ebeaninternal.server.grammer;
|
||||
|
||||
import io.ebean.FetchConfig;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
public class ParseFetchConfigTest {
|
||||
|
||||
@Test
|
||||
public void parse() throws Exception {
|
||||
|
||||
assertNull(ParseFetchConfig.parse("junk"));
|
||||
assertNull(ParseFetchConfig.parse("lazyFoo"));
|
||||
assertNull(ParseFetchConfig.parse("queryFoo"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void parseLazy() {
|
||||
FetchConfig lazy = ParseFetchConfig.parse("lazy");
|
||||
assertThat(lazy.getBatchSize()).isEqualTo(0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void parseLazy100() {
|
||||
FetchConfig lazy = ParseFetchConfig.parse("lazy(100)");
|
||||
assertThat(lazy.getBatchSize()).isEqualTo(100);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void parseQuery() {
|
||||
FetchConfig lazy = ParseFetchConfig.parse("query");
|
||||
assertThat(lazy.getBatchSize()).isEqualTo(100);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void parseQuery100() {
|
||||
FetchConfig lazy = ParseFetchConfig.parse("query(50)");
|
||||
assertThat(lazy.getBatchSize()).isEqualTo(50);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user