From f17edaf0750e6ef5292d490787cfe52a7e5d4cbe Mon Sep 17 00:00:00 2001 From: pinzart90 Date: Thu, 15 Feb 2024 15:16:31 -0500 Subject: [PATCH] Update DynamoTestUIBase.cs --- test/DynamoCoreWpfTests/DynamoTestUIBase.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/DynamoCoreWpfTests/DynamoTestUIBase.cs b/test/DynamoCoreWpfTests/DynamoTestUIBase.cs index f71bcbbbd33..4afd991c1ea 100644 --- a/test/DynamoCoreWpfTests/DynamoTestUIBase.cs +++ b/test/DynamoCoreWpfTests/DynamoTestUIBase.cs @@ -163,6 +163,12 @@ public virtual void Open(string pathInTestsDir) { string openPath = Path.Combine(GetTestDirectory(ExecutingDirectory), pathInTestsDir); ViewModel.OpenCommand.Execute(openPath); + + var xx = ViewModel.Model.EngineController.GetRuntimeWarnings(); + if (xx.Count > 0) + { + throw new Exception($"Found runtime warnings while opening the graph {pathInTestsDir} during test {TestContext.CurrentContext.Test.Name} "); + } } public void OpenAndRun(string pathInTestsDir) @@ -188,6 +194,11 @@ public virtual void Run() Thread.Sleep(1); } + var xx = ViewModel.Model.EngineController.GetRuntimeWarnings(); + if (xx.Count > 0) + { + throw new Exception($"Runtime warnings while running the graph {ViewModel.HomeSpace.FileName} during test {TestContext.CurrentContext.Test.Name} "); + } ViewModel.Model.EvaluationCompleted -= markDone; }