No effective change - remove unused HashQueryPlan etc

This commit is contained in:
rob bygrave committed 2017-12-28 16:17:00 +13:00
1 parent 9f91d8bcf9
commit 7110f4a59b
5 files changed
-239

No files matched your search

@@ -1,39 +0,0 @@
package io.ebeaninternal.api;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class HashQueryPlanBuilderTest {
int combine(int v0, int v1) {
return new HashQueryPlanBuilder().add(v0).add(v1).build().hashCode();
}
@Test
public void test_pair_0_1() {
assertThat(combine(0, 31)).isNotEqualTo(combine(1, 0));
}
@Test
public void test_pair_0_10_adjust_0() {
assertThat(combine(0, 310)).isNotEqualTo(combine(10, 0));
}
@Test
public void test_pair_0_10_adjust_10() {
assertThat(combine(0, 320)).isNotEqualTo(combine(10, 10));
}
@Test
public void test_pair_0_10_adjust_40() {
assertThat(combine(0, 350)).isNotEqualTo(combine(10, 40));
}
@Test
public void test_pair_0_10_adjust_90() {
assertThat(combine(0, 400)).isNotEqualTo(combine(10, 90));
}
}
@@ -1,45 +0,0 @@
package io.ebeaninternal.api;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class HashQueryPlanTest {
private HashQueryPlan hqp(String raw, int plan, int bind) {
return new HashQueryPlan(raw, plan, bind);
}
private int hc(String raw, int plan, int bind) {
return hqp(raw, plan, bind).hashCode();
}
@Test
public void testEquals() throws Exception {
assertThat(hqp("foo", 10, 7)).isEqualTo(hqp("foo", 10, 7));
assertThat(hqp("foo", 10, 7)).isNotEqualTo(hqp("foo", 11, 7));
assertThat(hqp("foo", 10, 7)).isNotEqualTo(hqp("foo", 9, 7));
assertThat(hqp("foo", 10, 7)).isNotEqualTo(hqp("foo", 10, 8));
assertThat(hqp("foo", 10, 7)).isNotEqualTo(hqp("foo", 10, 6));
assertThat(hqp("foo", 10, 7)).isNotEqualTo(hqp("bar", 10, 6));
assertThat(hqp("foo", 10, 7)).isNotEqualTo(hqp(null, 10, 7));
assertThat(hqp(null, 10, 7)).isNotEqualTo(hqp("foo", 10, 7));
assertThat(hqp(null, 10, 7)).isEqualTo(hqp(null, 10, 7));
}
@Test
public void testHashCode() throws Exception {
assertThat(hc("foo", 10, 7)).isEqualTo(hc("foo", 10, 7));
assertThat(hc("foo", 10, 7)).isNotEqualTo(hc("foo", 11, 7));
assertThat(hc("foo", 10, 7)).isNotEqualTo(hc("foo", 9, 7));
assertThat(hc("foo", 10, 7)).isNotEqualTo(hc("foo", 10, 8));
assertThat(hc("foo", 10, 7)).isNotEqualTo(hc("foo", 10, 6));
assertThat(hc("foo", 10, 7)).isNotEqualTo(hc("bar", 10, 6));
assertThat(hc("foo", 10, 7)).isNotEqualTo(hc(null, 10, 7));
assertThat(hc(null, 10, 7)).isNotEqualTo(hc("foo", 10, 7));
assertThat(hc(null, 10, 7)).isEqualTo(hc(null, 10, 7));
}
}