Skip to content

Commit 453265a

Browse files
PropertyQuery: min/max with no data is now 0 instead of min/max.
1 parent 2eb73e4 commit 453265a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/objectbox-java-test/src/test/java/io/objectbox/query/PropertyQueryTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -552,10 +552,10 @@ public void avg_noData() {
552552
@Test
553553
public void min_noData() {
554554
Query<TestEntity> baseQuery = box.query().build();
555-
assertEquals(Long.MAX_VALUE, baseQuery.property(simpleByte).min());
556-
assertEquals(Long.MAX_VALUE, baseQuery.property(simpleShort).min());
557-
assertEquals(Long.MAX_VALUE, baseQuery.property(simpleInt).min());
558-
assertEquals(Long.MAX_VALUE, baseQuery.property(simpleLong).min());
555+
assertEquals(0, baseQuery.property(simpleByte).min());
556+
assertEquals(0, baseQuery.property(simpleShort).min());
557+
assertEquals(0, baseQuery.property(simpleInt).min());
558+
assertEquals(0, baseQuery.property(simpleLong).min());
559559
}
560560

561561
@Test
@@ -568,10 +568,10 @@ public void minDouble_noData() {
568568
@Test
569569
public void max_noData() {
570570
Query<TestEntity> baseQuery = box.query().build();
571-
assertEquals(Long.MIN_VALUE, baseQuery.property(simpleByte).max());
572-
assertEquals(Long.MIN_VALUE, baseQuery.property(simpleShort).max());
573-
assertEquals(Long.MIN_VALUE, baseQuery.property(simpleInt).max());
574-
assertEquals(Long.MIN_VALUE, baseQuery.property(simpleLong).max());
571+
assertEquals(0, baseQuery.property(simpleByte).max());
572+
assertEquals(0, baseQuery.property(simpleShort).max());
573+
assertEquals(0, baseQuery.property(simpleInt).max());
574+
assertEquals(0, baseQuery.property(simpleLong).max());
575575
}
576576

577577
@Test

0 commit comments

Comments
 (0)