Refactor move tests from ebean-core to ebean-test

This commit is contained in:
rbygrave committed 2021-09-08 22:49:23 +12:00
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);
}
}