// SQLConnection_as.hx:  ActionScript 3 "SQLConnection" class, for Gnash.
//
// Generated by gen-as3.sh on: 20090514 by "rob". Remove this
// after any hand editing loosing changes.
//
//   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
//

// This test case must be processed by CPP before compiling to include the
//  DejaGnu.hx header file for the testing framework support.

#if flash9
import flash.data.SQLConnection;
import flash.display.MovieClip;
#else
import flash.SQLConnection;
import flash.MovieClip;
#end
import flash.Lib;
import Type;

// import our testing API
import DejaGnu;

// Class must be named with the _as suffix, as that's the same name as the file.
class SQLConnection_as {
    static function main() {
        var x1:SQLConnection = new SQLConnection();

        // Make sure we actually get a valid class        
        if (x1 != null) {
            DejaGnu.pass("SQLConnection class exists");
        } else {
            DejaGnu.fail("SQLConnection lass doesn't exist");
        }
// Tests to see if all the properties exist. All these do is test for
// existance of a property, and don't test the functionality at all. This
// is primarily useful only to test completeness of the API implementation.
	if (x1.autoCompact == false) {
	    DejaGnu.pass("SQLConnection::autoCompact property exists");
	} else {
	    DejaGnu.fail("SQLConnection::autoCompact property doesn't exist");
	}
	if (x1.cacheSize == uint) {
	    DejaGnu.pass("SQLConnection::cacheSize property exists");
	} else {
	    DejaGnu.fail("SQLConnection::cacheSize property doesn't exist");
	}
	if (x1.columnNameStyle == null) {
	    DejaGnu.pass("SQLConnection::columnNameStyle property exists");
	} else {
	    DejaGnu.fail("SQLConnection::columnNameStyle property doesn't exist");
	}
	if (x1.connected == false) {
	    DejaGnu.pass("SQLConnection::connected property exists");
	} else {
	    DejaGnu.fail("SQLConnection::connected property doesn't exist");
	}
	if (x1.inTransaction == false) {
	    DejaGnu.pass("SQLConnection::inTransaction property exists");
	} else {
	    DejaGnu.fail("SQLConnection::inTransaction property doesn't exist");
	}
	if (x1.lastInsertRowID == 0) {
	    DejaGnu.pass("SQLConnection::lastInsertRowID property exists");
	} else {
	    DejaGnu.fail("SQLConnection::lastInsertRowID property doesn't exist");
	}
	if (x1.pageSize == uint) {
	    DejaGnu.pass("SQLConnection::pageSize property exists");
	} else {
	    DejaGnu.fail("SQLConnection::pageSize property doesn't exist");
	}
	if (x1.totalChanges == 0) {
	    DejaGnu.pass("SQLConnection::totalChanges property exists");
	} else {
	    DejaGnu.fail("SQLConnection::totalChanges property doesn't exist");
	}

// Tests to see if all the methods exist. All these do is test for
// existance of a method, and don't test the functionality at all. This
// is primarily useful only to test completeness of the API implementation.
	if (x1.SQLConnection == SQLConnection) {
	    DejaGnu.pass("SQLConnection::SQLConnection() method exists");
	} else {
	    DejaGnu.fail("SQLConnection::SQLConnection() method doesn't exist");
	}
	if (x1.addEventListener == null) {
	    DejaGnu.pass("SQLConnection::addEventListener() method exists");
	} else {
	    DejaGnu.fail("SQLConnection::addEventListener() method doesn't exist");
	}
	if (x1.analyze == null) {
	    DejaGnu.pass("SQLConnection::analyze() method exists");
	} else {
	    DejaGnu.fail("SQLConnection::analyze() method doesn't exist");
	}
	if (x1.attach == null) {
	    DejaGnu.pass("SQLConnection::attach() method exists");
	} else {
	    DejaGnu.fail("SQLConnection::attach() method doesn't exist");
	}
	if (x1.begin == null) {
	    DejaGnu.pass("SQLConnection::begin() method exists");
	} else {
	    DejaGnu.fail("SQLConnection::begin() method doesn't exist");
	}
	if (x1.cancel == null) {
	    DejaGnu.pass("SQLConnection::cancel() method exists");
	} else {
	    DejaGnu.fail("SQLConnection::cancel() method doesn't exist");
	}
	if (x1.close == null) {
	    DejaGnu.pass("SQLConnection::close() method exists");
	} else {
	    DejaGnu.fail("SQLConnection::close() method doesn't exist");
	}
	if (x1.commit == null) {
	    DejaGnu.pass("SQLConnection::commit() method exists");
	} else {
	    DejaGnu.fail("SQLConnection::commit() method doesn't exist");
	}
	if (x1.compact == null) {
	    DejaGnu.pass("SQLConnection::compact() method exists");
	} else {
	    DejaGnu.fail("SQLConnection::compact() method doesn't exist");
	}
	if (x1.deanalyze == null) {
	    DejaGnu.pass("SQLConnection::deanalyze() method exists");
	} else {
	    DejaGnu.fail("SQLConnection::deanalyze() method doesn't exist");
	}
	if (x1.detach == null) {
	    DejaGnu.pass("SQLConnection::detach() method exists");
	} else {
	    DejaGnu.fail("SQLConnection::detach() method doesn't exist");
	}
	if (x1.getSchemaResult == SQLSchemaResult) {
	    DejaGnu.pass("SQLConnection::getSchemaResult() method exists");
	} else {
	    DejaGnu.fail("SQLConnection::getSchemaResult() method doesn't exist");
	}
	if (x1.loadSchema == null) {
	    DejaGnu.pass("SQLConnection::loadSchema() method exists");
	} else {
	    DejaGnu.fail("SQLConnection::loadSchema() method doesn't exist");
	}
	if (x1.open == null) {
	    DejaGnu.pass("SQLConnection::open() method exists");
	} else {
	    DejaGnu.fail("SQLConnection::open() method doesn't exist");
	}
	if (x1.openAsync == null) {
	    DejaGnu.pass("SQLConnection::openAsync() method exists");
	} else {
	    DejaGnu.fail("SQLConnection::openAsync() method doesn't exist");
	}
	if (x1.removeEventListener == null) {
	    DejaGnu.pass("SQLConnection::removeEventListener() method exists");
	} else {
	    DejaGnu.fail("SQLConnection::removeEventListener() method doesn't exist");
	}
	if (x1.rollback == null) {
	    DejaGnu.pass("SQLConnection::rollback() method exists");
	} else {
	    DejaGnu.fail("SQLConnection::rollback() method doesn't exist");
	}

        // Call this after finishing all tests. It prints out the totals.
        DejaGnu.done();
    }
}

// local Variables:
// mode: C++
// indent-tabs-mode: t
// End:

