Beispiel #1
0
        public void SavesLoads_Data_Lists()
        {
            SetupTest();
            VSave.CreateSlot("test 1");
            VSave.ChooseSlot("test 1");

            List <string> keys = new List <string>()
            {
                "A", "B", "C", "D"
            };
            List <bool> inputs = new List <bool>()
            {
                false, true, false, true
            };

            VSave.Set("folder", keys, inputs);

            VSave.Save();
            VSave.Reset(true);

            VSave.LoadSlots();
            VSave.ChooseSlot("test 1");

            if (VSave.Get("folder", keys, out List <bool> outputs))
            {
                Assert.AreEqual(inputs, outputs);
            }
            else
            {
                Assert.Fail("Failed to get info.");
            }
        }
Beispiel #2
0
        public void Loads_Saved_File()
        {
            SetupTest();

            VSave.CreateSlot("test 1");
            VSave.CreateSlot("test 2");
            VSave.CreateSlot("test 3");

            VSave.ChooseSlot("test 1");

            VSave.Set("test 1", "test 1", "test 1");

            VSave.Save();

            VSave.Reset(true);

            VSave.LoadSlots();

            VSave.ChooseSlot("test 1");
            VSave.Get <string>("test 1", "test 1");

            Assert.AreEqual(1, VSave.ActiveDataCount);
        }