Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • Nice idea! But it can only work if the interface of the execute methods are all the same. In my case there can be parameters for the "real work" ... Commented Jan 12 at 23:06
  • 1
    @DavidMason sure, and they can be defaults in your rainy day tests since the validation exceptions will keep them from being used. Commented Jan 12 at 23:08
  • 1
    @DavidMason so long as those parameters signature is the same across services this is simple. If not a little more fiddling will be needed. Commented Jan 12 at 23:16
  • Yes, the signatures can be different... I will see if I can find out some "fiddling" :) Commented Jan 13 at 9:47
  • 1
    @DavidMason the single type could have an entire inheritance hierarchy under it. The important thing is that: 1) there is a good default to pass to things that don't care about it because they're going to throw before they touch it and 2) the child services (and the child tests I guess) can find their custom needs hanging off of it. Commented Jan 13 at 16:53