From 8b21d49661c0a6248eea9aef21574bd19e67096e Mon Sep 17 00:00:00 2001 From: glopesdev Date: Fri, 13 Oct 2023 16:47:30 +0100 Subject: [PATCH 1/2] Assert all include workflows exist in manifest --- src/Aeon.Tests/AssertWorkflow.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Aeon.Tests/AssertWorkflow.cs b/src/Aeon.Tests/AssertWorkflow.cs index 6489bde..35986d1 100644 --- a/src/Aeon.Tests/AssertWorkflow.cs +++ b/src/Aeon.Tests/AssertWorkflow.cs @@ -27,6 +27,16 @@ public static void CanBuildEmbeddedResources(Assembly assembly) workflowBuilder.Workflow.Convert(builder => { var workflowElement = ExpressionBuilder.GetWorkflowElement(builder); + if (workflowElement is IncludeWorkflowBuilder includeWorkflow) + { + var pathComponents = includeWorkflow.Path.Split(':'); + var assembly = Assembly.Load(pathComponents[0]); + var resourceName = string.Join(ExpressionHelper.MemberSeparator, pathComponents); + Assert.IsNotNull( + assembly.GetManifestResourceStream(resourceName), + $"Embedded workflow: {name}. Missing resource name: {resourceName}"); + } + if (workflowElement.GetType().Name != nameof(SpinnakerCapture) && workflowElement.GetType().Name != nameof(PylonCapture) && #pragma warning disable CS0612 // Type or member is obsolete From ca1d1d31b65c16838490af29ebd2ba1c436f8442 Mon Sep 17 00:00:00 2001 From: glopesdev Date: Fri, 13 Oct 2023 16:48:19 +0100 Subject: [PATCH 2/2] Fix references to embedded workflows --- src/Aeon.Foraging/Aeon.Foraging.csproj | 2 +- src/Aeon.Foraging/LinearDepletion.bonsai | 2 +- src/Aeon.Foraging/RandomDepletion.bonsai | 2 +- src/Aeon.Foraging/TimeSpentOnWheel.bonsai | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Aeon.Foraging/Aeon.Foraging.csproj b/src/Aeon.Foraging/Aeon.Foraging.csproj index c5874d2..543751a 100644 --- a/src/Aeon.Foraging/Aeon.Foraging.csproj +++ b/src/Aeon.Foraging/Aeon.Foraging.csproj @@ -7,7 +7,7 @@ Bonsai Rx Project Aeon Foraging net472 0.1.0 - build230921 + build231007 diff --git a/src/Aeon.Foraging/LinearDepletion.bonsai b/src/Aeon.Foraging/LinearDepletion.bonsai index d8600cc..ea54b9b 100644 --- a/src/Aeon.Foraging/LinearDepletion.bonsai +++ b/src/Aeon.Foraging/LinearDepletion.bonsai @@ -67,7 +67,7 @@ - + 1 diff --git a/src/Aeon.Foraging/RandomDepletion.bonsai b/src/Aeon.Foraging/RandomDepletion.bonsai index caefdc0..aca5a98 100644 --- a/src/Aeon.Foraging/RandomDepletion.bonsai +++ b/src/Aeon.Foraging/RandomDepletion.bonsai @@ -68,7 +68,7 @@ - + 1 diff --git a/src/Aeon.Foraging/TimeSpentOnWheel.bonsai b/src/Aeon.Foraging/TimeSpentOnWheel.bonsai index 3c01f82..39a9a25 100644 --- a/src/Aeon.Foraging/TimeSpentOnWheel.bonsai +++ b/src/Aeon.Foraging/TimeSpentOnWheel.bonsai @@ -40,7 +40,7 @@ - + 5 0.0005