mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-19 23:02:24 +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,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();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user