Beispiel #1
0
 private void LoadData(string dbFilePath)
 {
     dbLoader        = new DbLoader.DbLoader(dbFilePath);
     temp            = dbLoader.GetData();
     dataForGridView = temp.ToList();
     InitColumns(dt);
     FillRows(dataForGridView, dt);
 }
Beispiel #2
0
        public void TestOpeningDbFile()
        {
            DbLoader.DbLoader loader = new DbLoader.DbLoader(@"C:\Data\Programming\GitHub Repo's\DBEditor\MuseADTServerDbEditor\DbLoaderTest\db.bin");
            var    data = loader.GetData();
            string value;

            data.TryGetValue("דוד", out value);
            Assert.AreEqual(value.ToLower(), "david");
        }
Beispiel #3
0
        public void TestFileSave()
        {
            Dictionary <string, string> data = new Dictionary <string, string>();

            data.Add("test", "testv");
            DbLoader.DbLoader dbLoader = new DbLoader.DbLoader(@"c:\tmp\db.bin");
            if (File.Exists(@"c:\tmp\db.bin"))
            {
                File.Delete(@"c:\tmp\db.bin");
            }
            dbLoader.SaveData(data);
            var    newData = dbLoader.GetData();
            string value;

            newData.TryGetValue("test", out value);
            Assert.AreEqual(value, "testv");
        }