/** * 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()); }
/** * 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("")); }