Пример #1
0
        public IEnumerator DeleteTest()
        {
            //Firt we try that the file can be saved/loaded
            PDBSave.Save("StringTest", "my Test");
            Assert.AreEqual(PDBLoad.Load("StringTest", ""), "my Test");
            //Now we try that the file can be
            string path = Application.persistentDataPath + "/" + "StringTest" + ".pdb";

            Assert.AreEqual(true, File.Exists(path));
            PDBCore.Remove("StringTest");
            Assert.AreEqual(false, File.Exists(path));
            yield return(null);
        }
Пример #2
0
        public IEnumerator SaveLoadList()
        {
            List <string> myList = new List <string>();

            myList.Add("hello");
            myList.Add("DdGVdo346oOad6Gkn2xw");
            myList.Add("");
            PDBSave.Save("ListTest", myList);
            List <string> newList = PDBLoad.Load <List <string> >("ListTest");

            Assert.AreEqual(newList.Contains("hello"), true);
            Assert.AreEqual(newList.Contains("DdGVdo346oOad6Gkn2xw"), true);
            Assert.AreEqual(newList.Contains(""), true);
            yield return(null);
        }
Пример #3
0
 public IEnumerator SaveLoadBool()
 {
     PDBSave.Save("BoolTest", false);
     Assert.AreEqual(PDBLoad.Load("BoolTest", false), false);
     yield return(null);
 }
Пример #4
0
 public IEnumerator SaveLoadString()
 {
     PDBSave.Save("StringTest", "my Test");
     Assert.AreEqual(PDBLoad.Load("StringTest", ""), "my Test");
     yield return(null);
 }
Пример #5
0
 public IEnumerator SaveLoadInt()
 {
     PDBSave.Save("IntTest", 5);
     Assert.AreEqual(PDBLoad.Load("intTest", -1), 5);
     yield return(null);
 }