Example #1
0
        private void SetupTest()
        {
            stringStore = new VirtualFile <string>(GAME_NAME, SLOT_NAME, LEVEL_NAME);
            intStore    = new VirtualFile <int>(GAME_NAME, SLOT_NAME, LEVEL_NAME);
            vecStore    = new VirtualFile <Vector2>(GAME_NAME, SLOT_NAME, LEVEL_NAME);

            stringStore.DeleteFile();
            intStore.DeleteFile();
            vecStore.DeleteFile();
        }
Example #2
0
        public void Deletes_File()
        {
            SetupTest();

            stringStore.Set("test 1", "test 1");
            stringStore.Set("test 2", "test 2");

            stringStore.Save();

            Assert.True(System.IO.File.Exists(stringStore.Path));

            stringStore.DeleteFile();

            Assert.False(System.IO.File.Exists(stringStore.Path));
        }