Mocking Dependencies With Generics
Elmar Kretzer (via Andy Bargh): You can inject code dependencies in a transparent way by using generics and typealias.[…]Those dependencies are loosely coupled, but in my opinion they belong together in a semantic way.[…]We end up with:a generic ModelFor taking a type conforming to Environmenta typealias Model representing ModelFor<RealWorld>no code necessary to manage the dependencies … Continue reading Mocking Dependencies With Generics
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed