public void Should_get_list_of_accessible_databases() { Database.CleanupTestDatabases(); var db = new ADatabase(Database.SystemAlias); var resultCreate = db.Create(Database.TestDatabaseOneTime); var resultList = db.GetAccessibleDatabases(); Assert.AreEqual(200, resultList.StatusCode); Assert.IsTrue(resultList.Success); Assert.IsTrue(resultList.HasValue); Assert.IsTrue(resultList.Value.Contains(Database.TestDatabaseOneTime)); }
public static void DeleteTestDatabase(string databaseName) { var db = new ADatabase(Database.SystemAlias); var resultList = db.GetAccessibleDatabases(); if (resultList.Success && resultList.Value.Contains(databaseName)) { db.Drop(databaseName); } }