Example #1
0
        public void TestHandleFetchMissingAsset()
        {
            IAssetCache assetCache = new TestAssetCache();
            CachedGetAssetStreamHandler handler = new CachedGetAssetStreamHandler(assetCache);

            GetAssetStreamHandlerTestHelpers.BaseFetchMissingAsset(handler);
        }
        public void TestHandleFetchMissingAsset()
        {
            IAssetCache assetCache = new TestAssetCache();
            CachedGetAssetStreamHandler handler;
            OSHttpResponse response;
            AssetBase      asset = CreateTestEnvironment(out handler, out response);

            GetAssetStreamHandlerTestHelpers.BaseFetchMissingAsset(handler, response);
        }
        //[Test]
        //public void TestHandleFetchExistingAssetMetaData()
        //{
        //    CachedGetAssetStreamHandler handler;
        //    OSHttpResponse response;
        //    AssetBase asset = CreateTestEnvironment(out handler, out response);

        //    GetAssetStreamHandlerTestHelpers.BaseFetchExistingAssetMetaDataTest(asset, handler, response);
        //}

        private static AssetBase CreateTestEnvironment(out CachedGetAssetStreamHandler handler, out OSHttpResponse response)
        {
            AssetBase asset = GetAssetStreamHandlerTestHelpers.CreateCommonTestResources(out response);

            IAssetCache assetDataPlugin = new TestAssetCache();

            handler = new CachedGetAssetStreamHandler(assetDataPlugin);

            assetDataPlugin.AddAsset(asset);
            return(asset);
        }