Esempio n. 1
0
 @Test
 public void testLocateNamedMem() throws Exception {
   final GraphDatabaseService db = databases.createDatabase(":mem:a", null);
   assertTrue(db instanceof ImpermanentGraphDatabase);
   final GraphDatabaseService db2 = databases.createDatabase(":mem:a", null);
   assertSame(db2, db);
 }
Esempio n. 2
0
 @Test
 public void testLocateFileDb() throws Exception {
   FileUtils.deleteRecursively(new File("target/test-db"));
   final GraphDatabaseService db = databases.createDatabase(":file:target/test-db", null);
   assertTrue(db instanceof EmbeddedGraphDatabase);
   final GraphDatabaseService db2 = databases.createDatabase(":file:target/test-db", null);
   assertSame(db2, db);
 }
Esempio n. 3
0
 @Test
 public void testLocateNamedInstance() throws Exception {
   final GraphDatabaseService db = new ImpermanentGraphDatabase();
   final Properties props = new Properties();
   props.put("a", db);
   final GraphDatabaseService db2 = databases.createDatabase(":instance:a", props);
   assertSame(db2, db);
 }
Esempio n. 4
0
 @Test
 @Ignore("readonly mode in parallel is no longer supported")
 public void testLocateFileDbReadonly() throws Exception {
   FileUtils.deleteRecursively(new File("target/test-db-ro"));
   new EmbeddedGraphDatabase("target/test-db-ro");
   final Properties props = new Properties();
   props.setProperty("readonly", "true");
   final GraphDatabaseService db = databases.createDatabase(":file:target/test-db-ro", props);
   assertTrue(db instanceof EmbeddedReadOnlyGraphDatabase);
 }
Esempio n. 5
0
 @Test
 public void testLocateMem() throws Exception {
   assertTrue(databases.createDatabase(":mem", null) instanceof ImpermanentGraphDatabase);
 }