uber-go / cadence-client

Framework for authoring workflows and activities running on top of the Cadence orchestration engine.
https://cadenceworkflow.io
MIT License
339 stars 128 forks source link

Implicit registration for Activities and Workflow when mocking them in the testsuite #1255

Closed edmondop closed 5 months ago

edmondop commented 1 year ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

When mocking an Activity or a Workflow using the TestWorkflowEnvironment, no-one is interested in mocking Workflows or Activities that will not be executed! And to be executed, they need to be registered. So why don't register them upon mocking, and ignore a double registration problem?

Proposed Solution A clear and concise description of what you want to happen.

Registering the activities and workflows when mocking them, and ignore if they are already registered.

Additional context Add any other context or screenshots about the feature request here.