File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
tests/objectbox-java-test/src/test/java/io/objectbox/sync Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import org .junit .Test ;
4
4
5
-
5
+ import io . objectbox . AbstractObjectBoxTest ;
6
6
import io .objectbox .BoxStore ;
7
7
8
8
9
+ import static org .junit .Assert .assertEquals ;
9
10
import static org .junit .Assert .assertFalse ;
11
+ import static org .junit .Assert .assertThrows ;
10
12
11
- public class SyncTest {
13
+ public class SyncTest extends AbstractObjectBoxTest {
12
14
13
15
/**
14
16
* Ensure that non-sync native library correctly reports sync client availability.
@@ -29,4 +31,13 @@ public void clientIsNotAvailable() {
29
31
public void serverIsNotAvailable () {
30
32
assertFalse (BoxStore .isSyncServerAvailable ());
31
33
}
34
+
35
+ @ Test
36
+ public void creatingSyncClient_throws () {
37
+ IllegalStateException exception = assertThrows (
38
+ IllegalStateException .class ,
39
+ () -> Sync .client (store , "wss://127.0.0.1" , SyncCredentials .none ())
40
+ );
41
+ assertEquals ("This ObjectBox library (JNI) does not include sync. Please update your dependencies." , exception .getMessage ());
42
+ }
32
43
}
You can’t perform that action at this time.
0 commit comments