O'Reilly logo

Professional Test-Driven Development with C#: Developing Real World Applications with TDD by Jeff McWherter, James Bender

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

10

Testing Windows Communication Foundation Services

WHAT'S IN THIS CHAPTER?

  • Understanding why Windows Communication Foundation (WCF) services are an important part of your application
  • Recognizing WCF services as interface code, similar to a Windows form or web page
  • Refactoring your WCF services to employ dependency injection
  • Understanding the role that transports play in testing WCF services

Like web pages or desktop windows, services are an interface to your application. As with the other interfaces to your application, your application's services need to be tested to ensure that they meet all the requirements that have been specified for them as an interface to your application. Testing services is especially necessary, because unlike Windows forms or web pages, errors and defects can be easily obfuscated or swallowed by a services layer in ways that make diagnosing defects extremely difficult.

WCF is the standard framework for creating services in .NET. However, many developers are intimidated by even the basics of WCF. As a result, even developers who are willing to learn WCF find testing services to be a daunting proposition. The skills to properly test WCF services are not difficult to learn. This chapter provides you with the tools and knowledge you need to test your WCF services.

imagesThis chapter assumes a basic level of knowledge and skill with WCF. If you are unfamiliar ...

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