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.

Make untestable code testable

Make untestable code testable - ASP.NET Core Tutorial

From the course: ASP.NET Core: Test-Driven Development

Start my 1-month free trial

Make untestable code testable

- [Instructor] If you've been following along with the code, I'd suggest you open the exercise files at the begin state for this video, because I've changed the state of the application a little bit. So the change we need to make is to add coupon code to our booking page, this is our booking page right now, and we've added a coupon code field, but it's not hooked up to anything. We can choose the Winchester Room, click book now, and it gives us the current estimated total. Let's head over to Visual Studio now, and we'll start looking for where we're going to make our changes. We'll start by going to the booking controller, and we'll go to the index post action. It looks like we'll have to make a small change here to pass through the data from our booking view model, and that gets passed into our calculate booking price method in our booking service, so let's go there. It looks like we'll have to make a change here too to account for our coupon code. So now we've identified where we…

Contents