Exemple #1
0
        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));
        }
Exemple #2
0
        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);
        }