Skip to Main Content
ASP.NET Web API 2 Recipes: A Problem Solution Approach
book

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

by Filip Wojcieszyn
August 2014
Intermediate to advanced content levelIntermediate to advanced
408 pages
9h 54m
English
Apress
Content preview from ASP.NET Web API 2 Recipes: A Problem Solution Approach

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Expert ASP.NET Web API 2 for MVC Developers

Expert ASP.NET Web API 2 for MVC Developers

Adam Freeman
Practical ASP.NET Web API

Practical ASP.NET Web API

Badrinarayanan Lakshmiraghavan
Pro ASP.NET Web API: HTTP Web Services in ASP.NET

Pro ASP.NET Web API: HTTP Web Services in ASP.NET

Tugberk Ugurlu, Alexander Zeitler, Ali Kheyrollahi

Publisher Resources

ISBN: 9781430259817Purchase book