O'Reilly logo

ASP.NET Web API 2 Recipes: A Problem Solution Approach by Filip Wojcieszyn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 11

image

Testing Web API Services

This chapter covers testing your ASP.NET Web API service. It will take a comprehensive look at both isolated unit testing of the individual Web API components and at broadly scoped end-to-end integration tests.

You will learn how to do the following:

  • Test controllers, message handlers, filters, and formatters (Recipes 11-1, 11-2, 11-3, and 11-4)
  • Take advantage of the testability benefits of IHttpActionResult (Recipe 11-5)
  • Test Web API routes (Recipe 11-6)
  • Run Web API in memory to perform complex integration tests (Recipes 11-7 and 11-8)

All the code samples used in this chapter rely on xUnit as the testing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required