Beispiel #1
0
        public async Task TestFileStorage()
        {
            var storage = new FileDataStorage();
            await storage.Save(_metadata);

            var data = await storage.Retrieve();

            CollectionAssert.AreEqual(data.RegisteredTypes.Select(metadata => metadata.TypeName).ToList(),
                                      _metadata.RegisteredTypes.Select(metadata => metadata.TypeName).ToList());
        }
        public void Save()
        {
            var jsonData = _model.ToJson();

            _dataStorage.Save(jsonData, "game");
        }