Skip to content

Fix testing with DI in Workflow #757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

xlegalles
Copy link
Contributor

Dependency injection is supported in Workflow but cannot be tested (fix)
It is related to changes made in PR: Allow dependency injection on Workflow #576
The new() constraint on TWokflow is still present on WorkflowTest while it has been removed elsewhere

Dependency injection is supported in Workflow but cannot be tested (fix)
fix: moved DI regstration
@xlegalles
Copy link
Contributor Author

It may also be useful to add comments in the documentation:

  • "step and workflow classes must be registered in the DI container if they expect dependencies to be injected". This is obvious, but personally I was expecting that it was already done by default.
  • "step classes must inherit directly from StepBody/StepBodyAsync i.e. cannot inherit from intermediate classes". No factorization allowed as I've started to do.

Thank you

@daniele-betsson
Copy link

would be fantastic to have this merged some years later :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants