in order to remove a couple of leaky abstractions. Taking a dependency on
Func<IViewRepository> indicates knowledge about a particular
In addition, the implementation violated the Liskov Substitution Principle
by attempting to downcast the created repository to IDisposable. This was
also a leaky abstraction.
Much to my surprise, NO UNIT TESTS BROKE because of this refactoring.
Either this project has surprisingly loosely coupled tests, or else the
coverage could be better.
The OrmViewRepositoryProxy is a pure infrastructure component, so I
decided to place it in the Composition Root of the application.
It's a Humble Object, so I didn't add any unit tests.
All unit tests are still green.
AFACT, this was the last dependency on this particular factory.
All in all, I think this refactoring removed more lines of code than it
added, and it also reduced the cyclomatic complexity of the code.
All tests are still green.