public void TestWriteFunctionObjectToExcel() { string openPath = Path.Combine(TestDirectory, @"core\excel\WriteFunctionObject_OpenXml.dyn"); ViewModel.OpenCommand.Execute(openPath); var filePath = Path.Combine(TempFolder, $"{nameof(TestWriteFunctionObjectToExcel)}_output.xlsx"); var stringNode = ViewModel.Model.CurrentWorkspace.FirstNodeFromWorkspace <CoreNodeModels.Input.StringInput>(); stringNode.Value = filePath; var readNode = ViewModel.Model.CurrentWorkspace.Nodes.First(n => n.Name == "Data.OpenXMLImportExcel"); ViewModel.HomeSpace.Run(); ProtoCore.RuntimeCore runtimeCore = ViewModel.Model.EngineController.LiveRunnerRuntimeCore; Assert.AreEqual(1, runtimeCore.RuntimeStatus.WarningCount); ProtoCore.Runtime.WarningEntry warningEntry = runtimeCore.RuntimeStatus.Warnings.ElementAt(0); Assert.AreEqual(ProtoCore.Runtime.WarningID.Default, warningEntry.ID); Assert.IsTrue(readNode.CachedValue.IsCollection); var list = readNode.CachedValue.GetElements().ToList(); Assert.AreEqual(0, list.Count); }
public void TestWarningMessageLog() { string openPath = Path.Combine(TestDirectory, @"core\messagelog\testwarningmessage.dyn"); RunModel(openPath); ProtoCore.RuntimeCore runtimeCore = CurrentDynamoModel.EngineController.LiveRunnerRuntimeCore; Assert.AreEqual(1, runtimeCore.RuntimeStatus.WarningCount); ProtoCore.Runtime.WarningEntry warningEntry = runtimeCore.RuntimeStatus.Warnings.ElementAt(0); Assert.AreEqual(ProtoCore.Runtime.WarningID.Default, warningEntry.ID); }
public void TestWarningMessageLog() { string openPath = Path.Combine(TestDirectory, @"core\messagelog\testwarningmessage.dyn"); ViewModel.OpenCommand.Execute(openPath); ViewModel.HomeSpace.Run(); ProtoCore.RuntimeCore runtimeCore = ViewModel.Model.EngineController.LiveRunnerRuntimeCore; Assert.AreEqual(1, runtimeCore.RuntimeStatus.WarningCount); ProtoCore.Runtime.WarningEntry warningEntry = runtimeCore.RuntimeStatus.Warnings.ElementAt(0); Assert.AreEqual(ProtoCore.Runtime.WarningID.kDefault, warningEntry.ID); }