Esempio n. 1
0
 public void AssetManager_GetAssetType2WithNotRegisteredExtension_Test()
 {
     var assetMgr = new AssetManager(Device, RenderSettings.MediaPath);
     Assert.IsNull(assetMgr.GetAssetType("nonRegisteredFile.extension"));
 }
Esempio n. 2
0
        public void AssetManager_RegisterAssetFactory_Test()
        {
            var assetMgr = new AssetManager(Device, RenderSettings.MediaPath);
            var factory = new AssetFactoryMock()
            {
                AssetType = typeof(AssetMock),
                FileExtensions = new string[] {".assetMock"},
            };
            assetMgr.RegisterAssetFactory(factory);

            Assert.AreEqual(typeof(AssetMock), assetMgr.GetAssetType(".assetMock"));
        }