summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/com/amazon/carbonado/qe/TestIndexedQueryAnalyzer.java24
-rw-r--r--src/test/java/com/amazon/carbonado/qe/TestIndexedQueryExecutor.java18
-rw-r--r--src/test/java/com/amazon/carbonado/qe/TestJoinedQueryExecutor.java2
-rw-r--r--src/test/java/com/amazon/carbonado/qe/TestUnionQueryAnalyzer.java9
4 files changed, 29 insertions, 24 deletions
diff --git a/src/test/java/com/amazon/carbonado/qe/TestIndexedQueryAnalyzer.java b/src/test/java/com/amazon/carbonado/qe/TestIndexedQueryAnalyzer.java
index 29e094d..740f26c 100644
--- a/src/test/java/com/amazon/carbonado/qe/TestIndexedQueryAnalyzer.java
+++ b/src/test/java/com/amazon/carbonado/qe/TestIndexedQueryAnalyzer.java
@@ -309,26 +309,22 @@ public class TestIndexedQueryAnalyzer extends TestCase {
throw new UnsupportedOperationException();
}
- public Cursor<S> fetch() {
+ public Cursor<S> fetchAll() {
throw new UnsupportedOperationException();
}
- public Cursor<S> fetch(StorableIndex<S> index) {
+ public Cursor<S> fetchOne(StorableIndex<S> index, Object[] identityValues) {
throw new UnsupportedOperationException();
}
- public Cursor<S> fetch(StorableIndex<S> index, Object[] identityValues) {
- throw new UnsupportedOperationException();
- }
-
- public Cursor<S> fetch(StorableIndex<S> index,
- Object[] identityValues,
- BoundaryType rangeStartBoundary,
- Object rangeStartValue,
- BoundaryType rangeEndBoundary,
- Object rangeEndValue,
- boolean reverseRange,
- boolean reverseOrder)
+ public Cursor<S> fetchSubset(StorableIndex<S> index,
+ Object[] identityValues,
+ BoundaryType rangeStartBoundary,
+ Object rangeStartValue,
+ BoundaryType rangeEndBoundary,
+ Object rangeEndValue,
+ boolean reverseRange,
+ boolean reverseOrder)
{
throw new UnsupportedOperationException();
}
diff --git a/src/test/java/com/amazon/carbonado/qe/TestIndexedQueryExecutor.java b/src/test/java/com/amazon/carbonado/qe/TestIndexedQueryExecutor.java
index 3226e13..4a4511e 100644
--- a/src/test/java/com/amazon/carbonado/qe/TestIndexedQueryExecutor.java
+++ b/src/test/java/com/amazon/carbonado/qe/TestIndexedQueryExecutor.java
@@ -680,7 +680,7 @@ public class TestIndexedQueryExecutor extends TestCase {
assertEquals(values.getFilter(), executor.getFilter());
List<OrderedProperty<StorableTestBasic>> expectedOrdering =
- makeOrdering(StorableTestBasic.class, "intProp", "-doubleProp", "stringProp");
+ makeOrdering(StorableTestBasic.class, "stringProp");
assertEquals(expectedOrdering, executor.getOrdering());
}
@@ -711,14 +711,14 @@ public class TestIndexedQueryExecutor extends TestCase {
static class MockSupport<S extends Storable> implements IndexedQueryExecutor.Support<S> {
Mock<S> mMock;
- public Cursor<S> fetch(StorableIndex<S> index,
- Object[] identityValues,
- BoundaryType rangeStartBoundary,
- Object rangeStartValue,
- BoundaryType rangeEndBoundary,
- Object rangeEndValue,
- boolean reverseRange,
- boolean reverseOrder)
+ public Cursor<S> fetchSubset(StorableIndex<S> index,
+ Object[] identityValues,
+ BoundaryType rangeStartBoundary,
+ Object rangeStartValue,
+ BoundaryType rangeEndBoundary,
+ Object rangeEndValue,
+ boolean reverseRange,
+ boolean reverseOrder)
{
mMock.mIdentityValues = identityValues;
mMock.mRangeStartBoundary = rangeStartBoundary;
diff --git a/src/test/java/com/amazon/carbonado/qe/TestJoinedQueryExecutor.java b/src/test/java/com/amazon/carbonado/qe/TestJoinedQueryExecutor.java
index ac4ebea..423cd74 100644
--- a/src/test/java/com/amazon/carbonado/qe/TestJoinedQueryExecutor.java
+++ b/src/test/java/com/amazon/carbonado/qe/TestJoinedQueryExecutor.java
@@ -194,7 +194,7 @@ public class TestJoinedQueryExecutor extends TestQueryExecutor {
return mQuery.getStorableType();
}
- public Cursor<S> fetch() throws FetchException {
+ public Cursor<S> fetchAll() throws FetchException {
return mQuery.fetch();
}
}
diff --git a/src/test/java/com/amazon/carbonado/qe/TestUnionQueryAnalyzer.java b/src/test/java/com/amazon/carbonado/qe/TestUnionQueryAnalyzer.java
index 7488c5b..0278eab 100644
--- a/src/test/java/com/amazon/carbonado/qe/TestUnionQueryAnalyzer.java
+++ b/src/test/java/com/amazon/carbonado/qe/TestUnionQueryAnalyzer.java
@@ -68,6 +68,15 @@ public class TestUnionQueryAnalyzer extends TestCase {
super(name);
}
+ public void testNullFilter() throws Exception {
+ UnionQueryAnalyzer uqa =
+ new UnionQueryAnalyzer(Shipment.class, TestIndexedQueryAnalyzer.RepoAccess.INSTANCE);
+ UnionQueryAnalyzer.Result result = uqa.analyze(null, null);
+ List<IndexedQueryAnalyzer<Shipment>.Result> subResults = result.getSubResults();
+
+ assertEquals(1, subResults.size());
+ }
+
public void testSingleSubResult() throws Exception {
UnionQueryAnalyzer uqa =
new UnionQueryAnalyzer(Shipment.class, TestIndexedQueryAnalyzer.RepoAccess.INSTANCE);