File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
tests/objectbox-java-test/src/test/java/io/objectbox Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -150,15 +150,17 @@ private void assertThrowsStoreIsClosed(ThrowingRunnable runnable) {
150150 assertEquals ("Store is closed" , ex .getMessage ());
151151 }
152152
153- @ Test (expected = DbException .class )
154- public void testPreventTwoBoxStoresWithSameFileOpenend () {
155- createBoxStore ();
153+ @ Test
154+ public void openSamePath_fails () {
155+ DbException ex = assertThrows (DbException .class , this ::createBoxStore );
156+ assertTrue (ex .getMessage ().contains ("Another BoxStore is still open for this directory" ));
156157 }
157158
158159 @ Test
159- public void testOpenSameBoxStoreAfterClose () {
160+ public void openSamePath_afterClose_works () {
160161 store .close ();
161- createBoxStore ();
162+ BoxStore store2 = createBoxStore ();
163+ store2 .close ();
162164 }
163165
164166 @ Test
You can’t perform that action at this time.
0 commit comments