public void _0_2_SetupImporter() { GraphStackController.CleanCache(); var projectFolderPath = Directory.GetParent(Application.dataPath).ToString(); var definedSourcePath = Path.Combine(projectFolderPath, "TestResources/TestResources0/"); var source = new Dictionary <string, List <InternalAssetData> > { { "0", new List <InternalAssetData> { InternalAssetData.InternalAssetDataByLoader(Path.Combine(definedSourcePath, "dummy.png"), definedSourcePath), InternalAssetData.InternalAssetDataByLoader(Path.Combine(definedSourcePath, "model/sample.fbx"), definedSourcePath) } } }; var results = new Dictionary <string, List <InternalAssetData> >(); var sImporter = new SampleImporter_0(); Action <string, string, Dictionary <string, List <InternalAssetData> >, List <string> > Out = (string nodeId, string connectionId, Dictionary <string, List <InternalAssetData> > output, List <string> cached) => { results[connectionId] = output["0"]; }; sImporter.Setup("ID_0_2_SetupImporter", "CONNECTION_0_2_SetupImporter", string.Empty, source, new List <string>(), Out); Debug.Log("passed _0_2_SetupImporter"); }
public void _0_3_RunImporter() { GraphStackController.CleanCache(); var projectFolderPath = Directory.GetParent(Application.dataPath).ToString(); var definedSourcePath = Path.Combine(projectFolderPath, "TestResources/TestResources0/"); var source = new Dictionary <string, List <InternalAssetData> > { { "0", new List <InternalAssetData> { InternalAssetData.InternalAssetDataByLoader(Path.Combine(definedSourcePath, "dummy.png"), definedSourcePath), InternalAssetData.InternalAssetDataByLoader(Path.Combine(definedSourcePath, "model/sample.fbx"), definedSourcePath) } } }; var results = new Dictionary <string, List <InternalAssetData> >(); var sImporter = new SampleImporter_0(); Action <string, string, Dictionary <string, List <InternalAssetData> >, List <string> > Out = (string nodeId, string connectionId, Dictionary <string, List <InternalAssetData> > output, List <string> cached) => { results[connectionId] = output["0"]; }; sImporter.Run("ID_0_3_RunImporter", "CONNECTION_0_3_RunImporter", string.Empty, source, new List <string>(), Out); var currentOutputs = results["CONNECTION_0_3_RunImporter"].Where(asset => !GraphStackController.IsMetaFile(asset.importedPath)).ToList(); if (currentOutputs.Count == 3) { Debug.Log("passed _0_3_RunImporter"); return; } Debug.LogError("failed to collect importerd resource currentOutputs.Count:" + currentOutputs.Count); }
public void _0_2_SetupImporter () { GraphStackController.CleanCache(); var projectFolderPath = Directory.GetParent(Application.dataPath).ToString(); var definedSourcePath = Path.Combine(projectFolderPath, "TestResources/TestResources0/"); var source = new Dictionary<string, List<InternalAssetData>> { {"0", new List<InternalAssetData> { InternalAssetData.InternalAssetDataByLoader(Path.Combine(definedSourcePath, "dummy.png"), definedSourcePath), InternalAssetData.InternalAssetDataByLoader(Path.Combine(definedSourcePath, "model/sample.fbx"), definedSourcePath) } } }; var results = new Dictionary<string, List<InternalAssetData>>(); var sImporter = new SampleImporter_0(); Action<string, string, Dictionary<string, List<InternalAssetData>>, List<string>> Out = (string nodeId, string connectionId, Dictionary<string, List<InternalAssetData>> output, List<string> cached) => { results[connectionId] = output["0"]; }; sImporter.Setup("ID_0_2_SetupImporter", "CONNECTION_0_2_SetupImporter", string.Empty, source, new List<string>(), Out); Debug.Log("passed _0_2_SetupImporter"); }
public void _0_3_RunImporter() { var projectFolderPath = Directory.GetParent(Application.dataPath).ToString(); var definedSourcePath = Path.Combine(projectFolderPath, "TestResources/"); var source = new Dictionary<string, List<InternalAssetData>> { {"0", new List<InternalAssetData> { InternalAssetData.InternalAssetDataByLoader(Path.Combine(definedSourcePath, "dummy.png"), definedSourcePath), InternalAssetData.InternalAssetDataByLoader(Path.Combine(definedSourcePath, "model/sample.fbx"), definedSourcePath) } } }; var results = new Dictionary<string, List<InternalAssetData>>(); var sImporter = new SampleImporter_0(); Action<string, string, Dictionary<string, List<InternalAssetData>>> Out = (string nodeId, string connectionId, Dictionary<string, List<InternalAssetData>> output) => { results[connectionId] = output["0"]; }; sImporter.Run("ID_0_3_RunImporter", "CONNECTION_0_3_RunImporter", source, Out); var currentOutputs = results["CONNECTION_0_3_RunImporter"]; if (currentOutputs.Count == 3) { Debug.Log("passed _0_3_RunImporter"); return; } Debug.LogError("failed to collect importerd resource"); }
public void _0_3_RunImporter () { GraphStackController.CleanCache(); var projectFolderPath = Directory.GetParent(Application.dataPath).ToString(); var definedSourcePath = Path.Combine(projectFolderPath, "TestResources/TestResources0/"); var source = new Dictionary<string, List<InternalAssetData>> { {"0", new List<InternalAssetData> { InternalAssetData.InternalAssetDataByLoader(Path.Combine(definedSourcePath, "dummy.png"), definedSourcePath), InternalAssetData.InternalAssetDataByLoader(Path.Combine(definedSourcePath, "model/sample.fbx"), definedSourcePath) } } }; var results = new Dictionary<string, List<InternalAssetData>>(); var sImporter = new SampleImporter_0(); Action<string, string, Dictionary<string, List<InternalAssetData>>, List<string>> Out = (string nodeId, string connectionId, Dictionary<string, List<InternalAssetData>> output, List<string> cached) => { results[connectionId] = output["0"]; }; sImporter.Run("ID_0_3_RunImporter", "CONNECTION_0_3_RunImporter", string.Empty, source, new List<string>(), Out); var currentOutputs = results["CONNECTION_0_3_RunImporter"].Where(asset => !GraphStackController.IsMetaFile(asset.importedPath)).ToList(); if (currentOutputs.Count == 3) { Debug.Log("passed _0_3_RunImporter"); return; } Debug.LogError("failed to collect importerd resource currentOutputs.Count:" + currentOutputs.Count); }