Skip to content
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

Refactor commands to use cleaner interface #140

Open
hasheddan opened this issue Jun 18, 2020 · 0 comments
Open

Refactor commands to use cleaner interface #140

hasheddan opened this issue Jun 18, 2020 · 0 comments
Assignees

Comments

@hasheddan
Copy link
Member

Currently, corral commands are passed to the Executor primitive along with a few other parameters that eventually effect what is being passed to the command's apply() method. This makes unit testing difficult as the parameters that are passed to the Executor are used for common checks across all commands before then being passed to the commands themselves.

A cleaner interface could look like initiating a CmdType with all (or most) of the parameters currently being passed to the Executor (and then subsequently to the CmdType apply()) or having separate CmdTypeInfo and CmdTypeAction traits that are initiated and will choose some of these parameters for you by default (e.g. the Logger).

Related to #138

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

No branches or pull requests

1 participant