mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-12-01 15:37:14 +00:00
#919 - io.ebean package initial
This commit is contained in:
1 parent
5821dc96b9
commit
971e2dc91b
2134 files changed
+10721
-8652
No files matched your search
@@ -0,0 +1,41 @@
|
||||
package io.ebeaninternal.server.expression;
|
||||
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.StrictAssertions.assertThat;
|
||||
|
||||
public class IdExpressionTest {
|
||||
|
||||
|
||||
@NotNull
|
||||
private IdExpression exp(Object value) {
|
||||
return new IdExpression(value);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isSameByPlan_when_same() {
|
||||
|
||||
assertThat(exp(10).isSameByPlan(exp(10))).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isSameByPlan_when_diffBind_same() {
|
||||
|
||||
assertThat(exp(10).isSameByPlan(exp(20))).isTrue();
|
||||
}
|
||||
|
||||
@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