Beispiel #1
0
        public void ExecuteSelectTableTemplateTest()
        {
            string dbfile = "taskaludb29.sqlite";
            string path   = Path.GetTempPath() + "\\" + dbfile;

            TouchTestDB(dbfile);

            var lt = new ListTemplate();

            lt.Order    = 1;
            lt.Name     = "name";
            lt.Template = "template";
            SQLiteClass.ExecuteInsertTableTemplate(path, lt);
            var lt2 = new ListTemplate();

            lt2.Order    = 2;
            lt2.Name     = "name2";
            lt2.Template = "template2";
            SQLiteClass.ExecuteInsertTableTemplate(path, lt2);

            var tlv    = new TemplateListViewModel();
            var result = SQLiteClass.ExecuteSelectTableTemplate(path, tlv);

            Debug.Assert(result);
            Debug.Assert(tlv.Entries.Count == 2);
        }