public void CanGetFiles() { var testSave = new SaveLoadTestObject() { testData = "SaveFileExists" }; var serializationMethod = GetSerializationMethod(SerializationMethodType.Binary); var filename = "TestSave.sav"; var folder = "TestFolder"; SaveLoadUtility.Save(testSave, serializationMethod, filename, folder); var files = SaveLoadUtility.GetSavedFiles(folder); Assert.IsTrue(files.Length == 1); //Files should contain a list of names that exactly match the file name used //omits the path of the file Assert.IsTrue(files[0] == filename); SaveLoadUtility.DeleteSavedFile(filename, folder); files = SaveLoadUtility.GetSavedFiles(); Assert.IsTrue(files.Length == 0); }
public void CanGetFiles_Empty() { var files = SaveLoadUtility.GetSavedFiles(); Assert.IsTrue(files.Length == 0); }