Exemple #1
0
 /**
  * Creates new databases.
  *
  * @throws IOException I/O exception
  */
 @Test
 public final void create() throws IOException {
   session.create(NAME, new ArrayInput(""));
   assertEqual("", session.query("db:open('" + NAME + "')").execute());
   session.create(NAME, new ArrayInput("<X/>"));
   assertEqual("<X/>", session.query("db:open('" + NAME + "')").execute());
 }
Exemple #2
0
 /**
  * Stops because of an invalid database name.
  *
  * @throws IOException I/O exception
  */
 @Test(expected = BaseXException.class)
 public final void createNameErr() throws IOException {
   session.create("", new ArrayInput(""));
 }