public void DeleteDatabase_DatabaseExist_DoTheThingsOK() { AbstractParser xmlParser = CreateXMLParser(); Database testDatabase = ObjectConstructor.CreateDatabaseFull("test4"); xmlParser.SaveDatabase(testDatabase); Assert.IsTrue(xmlParser.ExistDatabase(testDatabase.databaseName)); xmlParser.DeleteDatabase(testDatabase.databaseName); Assert.IsFalse(xmlParser.ExistDatabase(testDatabase.databaseName)); }
public void DeleteDatabase_DatabaseDoesntExist_ThrowException() { AbstractParser xmlParser = CreateXMLParser(); string randomDatabaseName = VariousFunctions.GenerateRandomString(6); while (xmlParser.ExistDatabase(randomDatabaseName)) { randomDatabaseName = VariousFunctions.GenerateRandomString(10); } Assert.IsFalse(xmlParser.ExistDatabase(randomDatabaseName)); xmlParser.DeleteDatabase(randomDatabaseName); }