Back to Browse

xunit test asp.net MVC Core project

3.2K views
Nov 1, 2023
23:45

I use xUnit to test an existing ASP.NET MVC Core project. I setup the testing permissions, add the nuget packages, and write basic Fact and Theory tests. I build two tests. One that checks that pages load as expected and return HTTP 200. The other checks for content in the HTML page. Harry Potter fails at the end because I removed it from the table. No judgment on the book, it just caused a PK error, and deleting it was the easiest solution.

Download

0 formats

No download links available.

xunit test asp.net MVC Core project | NatokHD