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,39 @@
package io.ebeaninternal.server.expression;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class IdExpressionTest extends BaseExpressionTest {
private IdExpression exp(Object value) {
return new IdExpression(value);
}
@Test
public void isSameByPlan_when_same() {
same(exp(10), exp(10));
}
@Test
public void isSameByPlan_when_diffBind_same() {
same(exp(10), exp(20));
}
@Test
public void isSameByBind_when_sameBindValues() {
assertThat(exp(10).isSameByBind(exp(10))).isTrue();
}
@Test
public void isSameByBind_when_diffBindValues() {
assertThat(exp(10).isSameByBind(exp(20))).isFalse();
assertThat(exp(10).isSameByBind(exp("junk"))).isFalse();
}
}