I added some test that proves that injecting operations when no container will work as expected.
@timriley following your comments on the issue I think the test satisfy your expectation.
what if someone was using dry-transaction without any container at all? That person may want to define transactions consisting of steps using injected operation objects, and still have the ability to wrap those in local methods (or not).
So this won't allow an injected operation object to fully replace a matching instance method. That method always will always get called first.
As a change, this does help dry-transaction work better without a container (i.e. such transactions would require all their step operation objects to be manually injected), which I think is a flexibility win.
Maybe if people still complaining that they want a way to completely replace local methods with injected operations for testing cases we could provide a test interface that would actually replace it. Probably in other PR.
75
I decided to start working on this one.
I added some test that proves that injecting operations when no container will work as expected.
@timriley following your comments on the issue I think the test satisfy your expectation.
Maybe if people still complaining that they want a way to completely replace local methods with injected operations for testing cases we could provide a test interface that would actually replace it. Probably in other PR.