/** * Drop the test database and stop BaseXHTTP. * * @throws Exception if database cannot be dropped or server cannot be stopped */ @After public void tearDown() throws Exception { try (final ClientSession cs = new ClientSession(context, UserText.ADMIN, UserText.ADMIN)) { cs.execute(new DropDB(NAME)); } stopBaseXHTTP(); }
/** * Create a test database and start BaseXHTTP. * * @throws Exception if database cannot be created or server cannot be started */ @Before public void setUp() throws Exception { startBaseXHTTP(); try (final ClientSession cs = new ClientSession(context, UserText.ADMIN, UserText.ADMIN)) { cs.execute(new CreateDB(NAME)); } }