Skip to content

Commit

Permalink
Disable the OR test
Browse files Browse the repository at this point in the history
  • Loading branch information
stickfigure committed Sep 27, 2022
1 parent 05c29cf commit fc1ce2b
Showing 1 changed file with 19 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.googlecode.objectify.test.entity.Trivial;
import com.googlecode.objectify.test.util.TestBase;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import java.util.ArrayList;
Expand All @@ -23,7 +22,6 @@
import static com.googlecode.objectify.cmd.Filter.greaterThanOrEqualTo;
import static com.googlecode.objectify.cmd.Filter.lessThan;
import static com.googlecode.objectify.cmd.Filter.lessThanOrEqualTo;
import static com.googlecode.objectify.cmd.Filter.or;

/**
* Exercise the Filter class.
Expand Down Expand Up @@ -82,29 +80,25 @@ void simpleConditions() throws Exception {
/** */
@Test
void compositeAndConditions() throws Exception {
{
final List<Trivial> list = ofy().load().type(Trivial.class).filter(
and(
greaterThan("someString", "foo1"),
lessThan("someString", "foo3")
)
).list();
assertThat(list).containsExactly(triv2);
}
}

/** This doesn't work yet, need support in the low level API */
@Test
@Disabled
void compositeOrConditions() throws Exception {
{
final List<Trivial> list = ofy().load().type(Trivial.class).filter(
or(
greaterThan("someString", "foo2"),
lessThan("someString", "foo2")
final List<Trivial> list = ofy().load().type(Trivial.class).filter(
and(
greaterThan("someString", "foo1"),
lessThan("someString", "foo3")
)
).list();
assertThat(list).containsExactly(triv1, triv3);
}
).list();
assertThat(list).containsExactly(triv2);
}

// /** This doesn't work yet, need support in the low level API */
// @Test
// @Disabled
// void compositeOrConditions() throws Exception {
// final List<Trivial> list = ofy().load().type(Trivial.class).filter(
// or(
// greaterThan("someString", "foo2"),
// lessThan("someString", "foo2")
// )
// ).list();
// assertThat(list).containsExactly(triv1, triv3);
// }
}

0 comments on commit fc1ce2b

Please sign in to comment.