Skip to content

Commit

Permalink
Update DynamoTestUIBase.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
pinzart90 committed Feb 15, 2024
1 parent f20c50d commit f17edaf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/DynamoCoreWpfTests/DynamoTestUIBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
}

Expand Down

0 comments on commit f17edaf

Please sign in to comment.