Наследование: System.IO.StreamReader
Пример #1
0
        public void XmlAssetLoaderLoadsCorrect()
        {
            var xmlAssetLoader = new XmlAssetLoader();
            var assetReader = new AssetReader(new FileStream("Data\\Test.xml", FileMode.Open), typeof(TestData));

            var asset = (TestData) xmlAssetLoader.LoadAsset(assetReader, typeof(TestData));

            Assert.Equal("string", asset.Test);
        }
Пример #2
0
        public void JsonAssetLoaderLoadsCorrect()
        {
            var jsonAssetLoader = new JsonAssetLoader();
            var assetReader = new AssetReader(new FileStream("Data\\Test.json", FileMode.Open), typeof (ExpandoObject));

            dynamic asset = jsonAssetLoader.LoadAsset(assetReader, typeof (ExpandoObject));

            Assert.Equal("string", asset.test);
        }