From the course: ASP.NET Core: Test-Driven Development
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Test base case - ASP.NET Core Tutorial
From the course: ASP.NET Core: Test-Driven Development
Test base case
- [Instructor] So I'm building a website for the Landon Hotel. They have the ability to book a hotel room on their website and it's very basic. But they want to add some more functionality. They've requested we add the ability to verify if a booking is valid before it gets booked. We've already created the UI and right now, it's always returning a valid. So if I click Book Now you'll see the booking was now valid. So now we just need to implement the logic. If we head over to the Visual Studio you can see our step class has three criteria. If the guest has requested a smoking room. If the guest is bringing pets. And, the number of guests. We're going to get started by making a new test project. We'll right click on a solution. Go to Add. New Project. We'll select dot net car on the left. And then choose Next Unit Test Project. We'll call it Landon Hotel dot tests. Now we'll rename this simple test to booking service tests. And Visual Studio is going to ask us if we'd like to rename…
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.