Skip to content

Commit

Permalink
Add to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
twastvedt committed Sep 23, 2024
1 parent 2c949de commit 1ef89d5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/DynamoCoreTests/Configuration/ExecutionSessionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class ExecutionSessionTests : DynamoModelTestBase
{
private TimeSpan lastExecutionDuration = new TimeSpan();
private IEnumerable<string> packagePaths;
private string preferenceFilePath;

protected override void GetLibrariesToPreload(List<string> libraries)
{
Expand Down Expand Up @@ -38,18 +39,19 @@ public void TestExecutionSession()

[Test]
[Category("UnitTests")]
public void TestExecutionSessionPackagePaths()
public void TestExecutionSessionPaths()
{
ExecutionEvents.GraphPreExecution += ExecutionEvents_GraphPreExecution;
RunModel(@"core\HomogeneousList\HomogeneousInputsValid.dyn");
Assert.IsNotEmpty(packagePaths, "packgePaths was empty");
Assert.IsNotEmpty(packagePaths, "packagePaths was empty");
Assert.IsNotEmpty(preferenceFilePath, "preferenceFilePath was empty");
ExecutionEvents.GraphPreExecution -= ExecutionEvents_GraphPreExecution;
}

private void ExecutionEvents_GraphPreExecution(Session.IExecutionSession session)
{
packagePaths = ExecutionEvents.ActiveSession.GetParameterValue(Session.ParameterKeys.PackagePaths) as IEnumerable<string>;

preferenceFilePath = ExecutionEvents.ActiveSession.GetParameterValue(Session.ParameterKeys.PreferenceFilePath) as string;
}

[OneTimeTearDown]
Expand Down

0 comments on commit 1ef89d5

Please sign in to comment.