@@ -0,0 +1,2319 @@
+package com.orientechnologies.orient.core.sql.executor;%0A%0Aimport com.orientechnologies.orient.core.db.ODatabaseSession;%0Aimport com.orientechnologies.orient.core.db.OrientDB;%0Aimport com.orientechnologies.orient.core.db.OrientDBConfig;%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0A/** @author Luigi Dell'Aquila (l.dellaquila-(at)-orientdb.com) */%0Apublic class ODropDatabaseStatementExecutionTest %7B%0A%0A  @Test%0A  public void testPlain() %7B%0A    String dbName = %22ODropDatabaseStatementExecutionTest_testPlain%22;%0A    OrientDB orientDb = new OrientDB(%22embedded:./target/%22, OrientDBConfig.defaultConfig());%0A    try %7B%0A      try (OResultSet result = orientDb.execute(%22create database %22 + dbName + %22 plocal%22)) %7B%0A        Assert.assertTrue(result.hasNext());%0A        OResult item = result.next();%0A        Assert.assertEquals(true, item.getProperty(%22created%22));%0A      %7D%0A      Assert.assertTrue(orientDb.exists(dbName));%0A%0A      ODatabaseSession session = orientDb.open(dbName, %22admin%22, %22admin%22);%0A      session.close();%0A%0A      orientDb.execute(%22drop database %22 + dbName);%0A      Assert.assertFalse(orientDb.exists(dbName));%0A    %7D finally %7B%0A      orientDb.close();%0A    %7D%0A  %7D%0A%0A  @Test%0A  public void testIfExists1() %7B%0A    String dbName = %22ODropDatabaseStatementExecutionTest_testIfExists1%22;%0A    OrientDB orientDb = new OrientDB(%22embedded:./target/%22, OrientDBConfig.defaultConfig());%0A    try %7B%0A      try (OResultSet result = orientDb.execute(%22create database %22 + dbName + %22 plocal%22)) %7B%0A        Assert.assertTrue(result.hasNext());%0A        OResult item = result.next();%0A        Assert.assertEquals(true, item.getProperty(%22created%22));%0A      %7D%0A      Assert.assertTrue(orientDb.exists(dbName));%0A%0A      ODatabaseSession session = orientDb.open(dbName, %22admin%22, %22admin%22);%0A      session.close();%0A%0A      orientDb.execute(%22drop database %22 + dbName + %22 if exists%22);%0A      Assert.assertFalse(orientDb.exists(dbName));%0A    %7D finally %7B%0A      orientDb.close();%0A    %7D%0A  %7D%0A%0A  @Test%0A  public void testIfExists2() %7B%0A    String dbName = %22ODropDatabaseStatementExecutionTest_testIfExists2%22;%0A    OrientDB orientDb = new OrientDB(%22embedded:./target/%22, OrientDBConfig.defaultConfig());%0A    try %7B%0A      orientDb.execute(%22drop database %22 + dbName + %22 if exists%22);%0A      Assert.assertFalse(orientDb.exists(dbName));%0A    %7D finally %7B%0A      orientDb.close();%0A    %7D%0A  %7D%0A%7D%0A

Add test cases for DROP DATABASE statement