public void TestMethod_HasData() { string sql = "select * from DB_Version;"; bool value = SqLiteDataManagement.HasData(Settings.SQLiteDatabase.StarterDatabaseNameAndPath, sql, out errOut); General.HasTrueValue(value, errOut); }
public void TestMethod_RunQuery() { string sql = "INSERT INTO DB_Version (version) VALUES (2.0);"; bool value = SqLiteDataManagement.RunQuery(Settings.SQLiteDatabase.StarterDatabaseNameAndPath, sql, out errOut); General.HasTrueValue(value, errOut); }
public void TestMethod_ConnectDB() { SqLiteDataManagement obj = new SqLiteDataManagement(); bool value = obj.ConnectDb(Settings.SQLiteDatabase.StarterDatabaseNameAndPath, out errOut); General.HasTrueValue(value, errOut); }
public void TestMethod_GetSingleValueFromDatabase_String() { string sql = "select * from DB_Version order by dt desc limit 1;"; string value = SqLiteDataManagement.GetSingleValueFromDatabase(Settings.SQLiteDatabase.StarterDatabaseNameAndPath, sql, "dt", "", out errOut); General.HasValue(value, errOut); }
public void TestMethod_GetSingleValueFromDatabase_Double() { string sql = "select * from DB_Version order by dt desc limit 1;"; double value = SqLiteDataManagement.GetSingleValueFromDatabase(Settings.SQLiteDatabase.StarterDatabaseNameAndPath, sql, "version", 0.0, out errOut); bool HasValue = (value > 0); Debug.Print("Value Returned is: {0}", value); General.HasTrueValue(HasValue, errOut); }
public void TestMethod_GetDataBySQL() { string sql = "select * from DB_Version;"; DataTable dt = SqLiteDataManagement.GetDataBySql(Settings.SQLiteDatabase.StarterDatabaseNameAndPath, sql, out errOut); bool HasData = false; if (errOut.Length == 0) { HasData = (dt.Rows.Count > 0); foreach (DataRow dr in dt.Rows) { Debug.Print("{0}", dr["id"].ToString()); Debug.Print("{0}", dr["version"].ToString()); Debug.Print("{0}", dr["dt"].ToString()); Debug.Print(""); } } General.HasTrueValue(HasData, errOut); }
public void TestMethod_CleanDB() { bool value = SqLiteDataManagement.CleanDb(Settings.SQLiteDatabase.StarterDatabaseNameAndPath, out errOut); General.HasTrueValue(value, errOut); }