Skip to content

Commit d3b2fad

Browse files
CursorTest: adapt to changed invalid ID error message
1 parent fb44f28 commit d3b2fad

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

tests/objectbox-java-test/src/test/java/io/objectbox/CursorTest.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017 ObjectBox Ltd. All rights reserved.
2+
* Copyright 2017-2024 ObjectBox Ltd. All rights reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,13 +16,20 @@
1616

1717
package io.objectbox;
1818

19-
import io.objectbox.annotation.IndexType;
2019
import org.junit.Test;
2120

2221
import java.util.concurrent.CountDownLatch;
2322
import java.util.concurrent.TimeUnit;
2423

25-
import static org.junit.Assert.*;
24+
import io.objectbox.annotation.IndexType;
25+
26+
27+
import static org.junit.Assert.assertEquals;
28+
import static org.junit.Assert.assertFalse;
29+
import static org.junit.Assert.assertNotNull;
30+
import static org.junit.Assert.assertNull;
31+
import static org.junit.Assert.assertThrows;
32+
import static org.junit.Assert.assertTrue;
2633

2734
public class CursorTest extends AbstractObjectBoxTest {
2835

@@ -60,7 +67,7 @@ public void testPutEntityWithInvalidId() {
6067
IllegalArgumentException ex = assertThrows(IllegalArgumentException.class,
6168
() -> cursor.put(entity));
6269
assertEquals(ex.getMessage(), "ID is higher or equal to internal ID sequence: 777 (vs. 1)." +
63-
" Use ID 0 (zero) to insert new entities.");
70+
" Use ID 0 (zero) to insert new objects.");
6471
} finally {
6572
// Always clean up, even if assertions fail, to avoid misleading clean-up errors.
6673
cursor.close();

0 commit comments

Comments
 (0)