Example #1
0
        public void ExecuteInsertTableTemplatePathTest()
        {
            string dbfile = "taskaludb33.sqlite";
            string path   = Path.GetTempPath() + "\\" + dbfile;

            TouchTestDB(dbfile);

            var lt = new ListTemplatePath();

            lt.Template_Id = 1;
            lt.Order       = 1;
            lt.Path        = "path";

            Debug.Assert(SQLiteClass.ExecuteInsertTableTemplatePath(path, lt));
        }
Example #2
0
        public void ExecuteSelectTableTemplatePathTest()
        {
            string dbfile = "taskaludb34.sqlite";
            string path   = Path.GetTempPath() + "\\" + dbfile;

            TouchTestDB(dbfile);

            var lt = new ListTemplatePath();

            lt.Template_Id = 1;
            lt.Order       = 1;
            lt.Path        = "path";

            SQLiteClass.ExecuteInsertTableTemplatePath(path, lt);

            var tplv = new TemplatePathListViewModel();

            Debug.Assert(SQLiteClass.ExecuteSelectTableTemplatePath(path, tplv, 1));
            Debug.Assert(tplv.Entries.Count == 1);
        }
Example #3
0
        public void ExecuteSelectCountTemplatePathTest()
        {
            string dbfile = "taskaludb36.sqlite";
            string path   = Path.GetTempPath() + "\\" + dbfile;

            TouchTestDB(dbfile);

            var lt = new ListTemplatePath();

            lt.Template_Id = 1;
            lt.Order       = 1;
            lt.Path        = "path";
            SQLiteClass.ExecuteInsertTableTemplatePath(path, lt);
            var lt2 = new ListTemplatePath();

            lt2.Template_Id = 1;
            lt2.Order       = 2;
            lt2.Path        = "path2";
            SQLiteClass.ExecuteInsertTableTemplatePath(path, lt2);

            Debug.Assert(SQLiteClass.ExecuteSelectCountTemplatePath(path, 1, "path2") == 1);
        }