Deveel.Data.DropTableTests.OnTearDown C# (CSharp) Method

OnTearDown() protected method

protected OnTearDown ( string testName, IQuery query ) : bool
testName string
query IQuery
return bool
        protected override bool OnTearDown(string testName, IQuery query)
        {
            var tn1 = ObjectName.Parse("APP.test_table1");
            var tn2 = ObjectName.Parse("APP.test_table2");

            if (query.Access().TableExists(tn2)) {
                query.Access().DropAllTableConstraints(tn2);
            }

            if (query.Access().TableExists(tn1)) {
                query.Access().DropAllTableConstraints(tn1);
            }

            query.Access().DropObject(DbObjectType.Table, tn2);
            query.Access().DropObject(DbObjectType.Table, tn1);
            return true;
        }