Open-source multiplayer game server compatible with the RuneScape client https://www.openrs2.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
openrs2/cache/src/test/kotlin/org/openrs2/cache/StoreTest.kt

29 lines
867 B

package org.openrs2.cache
import java.nio.file.Path
import kotlin.test.Test
import kotlin.test.assertTrue
class StoreTest {
@Test
fun testOpen() {
Store.open(DISK_ROOT).use { store ->
assertTrue(store is DiskStore)
}
Store.open(LEGACY_DISK_ROOT).use { store ->
assertTrue(store is DiskStore)
}
Store.open(FLAT_FILE_ROOT).use { store ->
assertTrue(store is FlatFileStore)
}
}
private companion object {
private val DISK_ROOT = Path.of(StoreTest::class.java.getResource("disk-store/empty").toURI())
private val LEGACY_DISK_ROOT =
Path.of(StoreTest::class.java.getResource("disk-store/single-block-legacy").toURI())
private val FLAT_FILE_ROOT = Path.of(StoreTest::class.java.getResource("flat-file-store/empty").toURI())
}
}