From the course: ASP.NET Core: Test-Driven Development
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Configure the app for testability - ASP.NET Core Tutorial
From the course: ASP.NET Core: Test-Driven Development
Configure the app for testability
- [Instructor] So let's take a look at how we can use dependency injection and IOC together to create test of applications. For this cause, we're going to imagine we're doing some work on our website for Landon Hotel. A fancy hotel in London. The website is a very standard Boostrap MVC application with a little bit of data and structure built into it. Landon Hotel wants us to improve their booking system to show the costs of a booking. Now we're going to open up Visual Studio and you can follow along with me by opening up the Begin state in the exercise files for this video. Let's start by setting up the IOC container. When you create a new project in our core MVC you can go to the setup dot CS file. And if you scroll down you should see a configure services method. This is how you register your services for the IOC container. Physically, what this is doing is setting up our application to say where my code has a dependency for one of these things. Here is what I actually want you, as…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.