public void DoubleMergeTest()
        {
            var    cache = new AssetCache();
            var    path1 = PathToFile("SimpleScene.unity");
            var    path2 = PathToFile("SampleScene.unity");
            object test1 = cache.Build(path1, () => { });
            object test2 = cache.Build(path2, () => { });

            cache.Merge(path1, test1);
            cache.Merge(path2, test2);

            Assert.IsTrue(cache.IsBuiltAndReady);
        }
        public void Init()
        {
            caches = new Dictionary <string, AssetCache>();

            var    cache = new AssetCache();
            var    path  = PathToFile("SampleScene.unity");
            object test  = cache.Build(path, () => { });

            cache.Merge(path, test);

            caches.Add("SampleScene.unity", cache);

            cache = new AssetCache();
            path  = PathToFile("SimpleScene.unity");
            test  = cache.Build(path, () => { });
            cache.Merge(path, test);
            caches.Add("SimpleScene.unity", cache);

            componentsTestSets = new ulong[][]
            {
                new ulong[] { 757051390, 757051389, 757051388, 757051387, 757051386 },
                new ulong[] { },
                new ulong[] { 17641, 17644, 17643, 17642 },
                new ulong[] { 1278330992, 1278330996, 1278330995, 1278330994, 1278330993 },
                new ulong[] { 705507995, 705507994 }
            };
        }
        public void OperationCancelTest()
        {
            var    cache = new AssetCache();
            var    path  = PathToFile("SampleScene.unity");
            object test;

            try
            {
                cache.Build(path, () => { throw new AssetCacheImplementation.OperationCanceledException(); });
            }
            catch { }
            test = cache.Build(path, () => { });

            cache.Merge(path, test);

            Assert.IsTrue(cache.IsBuiltAndReady);
        }
        public void BuildTest(string fileName)
        {
            var    cache = new AssetCache();
            var    path  = PathToFile(fileName);
            object test  = cache.Build(path, () => { });

            cache.Merge(path, test);
            Assert.IsTrue(cache.IsBuiltAndReady);
        }
        public void GuidCountExceptionTest()
        {
            var    cache  = new AssetCache();
            var    path   = PathToFile("SimpleScene.unity");
            var    anchor = "801a0a604e828724da83b96f51cee06d";
            object test   = cache.Build(path, () => { });

            //cache.Merge(path, test);
            Assert.Catch(() => { cache.GetGuidUsages(anchor); });
        }
        public void GetComponentsExceptionTest()
        {
            var    cache  = new AssetCache();
            var    path   = PathToFile("SimpleScene.unity");
            ulong  anchor = 1278330992;
            object test   = cache.Build(path, () => { });

            //cache.Merge(path, test);
            Assert.Catch(() => { cache.GetComponentsFor(anchor); });
        }