Added iterate test

This commit is contained in:
Lassi Immonen 2010-09-22 05:48:56 +00:00
parent e993b80737
commit e1b9590844
2 changed files with 9 additions and 0 deletions

View File

@ -68,16 +68,19 @@ public class MongodbQuery<K> implements SimpleQuery<MongodbQuery<K>>,
@Override
public MongodbQuery<K> limit(long limit) {
//TODO Add support
return queryMixin.limit(limit);
}
@Override
public MongodbQuery<K> offset(long offset) {
//TODO Add support
return queryMixin.offset(offset);
}
@Override
public MongodbQuery<K> restrict(QueryModifiers modifiers) {
//TODO Implement this
return queryMixin.restrict(modifiers);
}
@ -143,11 +146,13 @@ public class MongodbQuery<K> implements SimpleQuery<MongodbQuery<K>>,
@Override
public K uniqueResult() {
//TODO Do this
throw new UnsupportedOperationException();
}
@Override
public SearchResults<K> listResults() {
//TODO Do this
throw new UnsupportedOperationException();
}

View File

@ -118,6 +118,10 @@ public class MongodbQueryTest {
assertEquals(false, i.hasNext());
}
//TODO
// - test dates
// - test with empty values and nulls
// - test more complex ands
private void assertQuery(Predicate e, User ... expected) {
assertQuery(where(e).orderBy(user.lastName.asc(), user.firstName.asc()), expected );