Prairie.Code() Sessions tagged dependency injection

Deep dive into dependency injection

Why do we need loosly coupled applications. Ways to impliment dependency injection. Deep dive into some advanced DI concepts. Talk about some Some of the benefits of using a DI framework. Cover some of the existing DI frameworks in C# with examples

Speaker

Yair Segal

Yair Segal

CEO/ Chief architect, Peach Software Inc

Unit-Testing Apps With Ease

Do you want to skip all the setup ceremony and get straight to the actual testing when writing unit tests? Using dependency injection and an IoC container makes it easy to create apps that are modular and testable, but all that dependency injection magic can make our test code seem overly complex and cluttered with a lot of ceremony just to create a testable instance of a object and its dependencies. I've learned to embrace the magic of IoC and DI, along with mock objects, to lower the friction of writing and maintaining unit tests. We'll look at the open-source library, Ease, and see how it taps into the life-cycle of our unit testing framework with an IoC container and object mocking framework to make sure each test has clean dependencies and keep us from ever directly instantiating our ViewModels or their dependencies again. We'll focus on how it can be applied to a Xamarin.Forms and Prism based app, but the same tools and techniques can be used in any code written against an IoC container. A great side-effect is that our tests become more resilient against changing dependencies that do not concern the test. What are you waiting for? Stop the ceremony, and start testing!

Speaker

Duane Newman

Duane Newman

Co-Founder, Alien Arc Technologies, LLC