public void SaveAndLoadGraphAssetGivesSameGraph()
        {
            try
            {
                var expected = CompatibilityGraphModelBuilder.CreateAsset(k_TemporaryAssetName, k_TemporaryAssetPath);

                CompatibilityGraphModelBuilder.CreateAsset(k_TemporaryAssetName2, k_TemporaryAssetPath2);
                AssetDatabase.SaveAssets();
                AssetDatabase.ForceReserializeAssets(new[] { k_TemporaryAssetPath2 });
                AssetDatabase.ImportAsset(k_TemporaryAssetPath2, ImportAssetOptions.ForceUpdate | ImportAssetOptions.ForceSynchronousImport);
                var actual = AssetDatabase.LoadAssetAtPath <GraphAssetModel>(k_TemporaryAssetPath2);

                Assert.AreNotSame(expected, actual);
                GraphChecks.AssertIsGraphAsExpected(expected.GraphModel, actual.GraphModel);
            }
            finally
            {
                AssetDatabase.DeleteAsset(k_TemporaryAssetPath);
                AssetDatabase.DeleteAsset(k_TemporaryAssetPath2);
            }
        }
        public void LoadingAssetMakesSameGraph(string hiddenAssetPath)
        {
            if (!Directory.Exists(k_TemporaryAssetDir))
            {
                Directory.CreateDirectory(k_TemporaryAssetDir);
            }
            var tmpCurrentAssetName = k_TmpCurrentVersionAssetPath;

            FileUtil.ReplaceFile(hiddenAssetPath, tmpCurrentAssetName);
            AssetDatabase.ImportAsset(tmpCurrentAssetName);
            AssetDatabase.ForceReserializeAssets(new[] { tmpCurrentAssetName });
            try
            {
                var expected = CompatibilityGraphModelBuilder.CreateAsset(k_TemporaryAssetName, k_TemporaryAssetPath);

                var actual = AssetDatabase.LoadAssetAtPath <GraphAssetModel>(tmpCurrentAssetName);
                GraphChecks.AssertIsGraphAsExpected(expected.GraphModel, actual.GraphModel);
            }
            finally
            {
                AssetDatabase.DeleteAsset(k_TemporaryAssetPath);
                AssetDatabase.DeleteAsset(tmpCurrentAssetName);
            }
        }