-
Looking again at the project here I tweaked it a little bit. The whole thing builds, but I'm having trouble getting the aspect test to generate as it should. If we turn our attention to the using Dapr.Workflow;
namespace Innovian.Aspects.Dapr.WorkflowRegistration.AspectTests;
public static partial class DaprRegistrationHelper
{
public static void RegisterAllEntities(WorkflowRuntimeOptions c)
{
c.RegisterWorkflow<global::Innovian.Aspects.Dapr.WorkflowRegistration.AspectTests.Workflows.MyWorkflow>();
c.RegisterActivity<global::Innovian.Aspects.Dapr.WorkflowRegistration.AspectTests.Workflows.MyActivity>();
c.RegisterActivity<global::Innovian.Aspects.Dapr.WorkflowRegistration.AspectTests.Workflows.MyOtherActivity>();
}
} So that works exactly as I want it to. But I want to set up a test to validate this, so let's add the latest (2024.2.19) Using the MSTest context menu option, I then Run Tests to have it generate the .t.cs files in "/obj/transformed/net8.0". I don't generally care about the other files generated, so looking just at namespace Innovian.Aspects.Dapr.WorkflowRegistration.AspectTests;
public static partial class DaprRegistrationHelper
{
public static void RegisterAllEntities(global::Dapr.Workflow.WorkflowRuntimeOptions c)
{
}
} It's inserting the method as expected with the argument, but it's skipping over each of the other types in the project that the fabric should have observed. Briefly looking what it should have done:
In summary, this aspect works as expected if I don't have the What am I doing wrong here? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
I don't know what's wrong in the aspect, but I suggest you put a breakpoint in the template of |
Beta Was this translation helpful? Give feedback.
-
Hello, |
Beta Was this translation helpful? Give feedback.
You may need to include the
.cs
files from the Workflow directory in your test. To do that, add the following to the beginning of the test. (E.g. to theDaprRegistrationHelper.cs
.)