@Test(expected = CouchException.class) public void createDb_invalidDBNmae_exception() { // Couch does not like capital character in db name String dbName = "mazha_test_INVALID_DB_NAME"; CouchClient customClient = new CouchClient(getCouchConfig(dbName)); customClient.createDb(); }
@Test public void deleteDb_dbMustBeDeleted() { String dbName = "mazha_test_deletedb" + System.currentTimeMillis(); CouchClient customClient = new CouchClient(getCouchConfig(dbName)); ClientTestUtils.deleteQuietly(client); customClient.createDb(); Assert.assertTrue("DB must exist.", isDbExist(dbName)); customClient.deleteDb(); Assert.assertFalse("DB must not exist.", isDbExist(dbName)); }