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); }
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); }
public IEnumerator SaveLoadBool() { PDBSave.Save("BoolTest", false); Assert.AreEqual(PDBLoad.Load("BoolTest", false), false); yield return(null); }
public IEnumerator SaveLoadString() { PDBSave.Save("StringTest", "my Test"); Assert.AreEqual(PDBLoad.Load("StringTest", ""), "my Test"); yield return(null); }
public IEnumerator SaveLoadInt() { PDBSave.Save("IntTest", 5); Assert.AreEqual(PDBLoad.Load("intTest", -1), 5); yield return(null); }