public void Dispose() { var databases = ArangoClient.ListDatabases( Database.Hostname, Database.Port, Database.IsSecured, Database.UserName, Database.Password ); if (databases.Contains(Database.TestDatabaseOneTime)) { ArangoClient.DeleteDatabase( Database.Hostname, Database.Port, Database.IsSecured, Database.TestDatabaseOneTime, Database.UserName, Database.Password ); } if (databases.Contains(Database.TestDatabaseGeneral)) { ArangoClient.DeleteDatabase( Database.Hostname, Database.Port, Database.IsSecured, Database.TestDatabaseGeneral, Database.UserName, Database.Password ); } }
public static void DeleteTestDatabase(string databaseName) { var databases = ArangoClient.ListDatabases( Database.Hostname, Database.Port, Database.IsSecured, Database.UserName, Database.Password ); if (databases.Contains(databaseName)) { ArangoClient.DeleteDatabase( Database.Hostname, Database.Port, Database.IsSecured, databaseName, Database.UserName, Database.Password ); } }
public void Should_create_and_delete_database() { var created = ArangoClient.CreateDatabase( Database.Hostname, Database.Port, Database.IsSecured, Database.TestDatabaseGeneral, Database.UserName, Database.Password ); Assert.AreEqual(true, created); var deleted = ArangoClient.DeleteDatabase( Database.Hostname, Database.Port, Database.IsSecured, Database.TestDatabaseGeneral, Database.UserName, Database.Password ); Assert.AreEqual(true, deleted); }