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