Unit Testing .NET Applications Using Code Contracts

As a developer is going through the testing phase of application development, they will typically take the app through unit testing, where several small tests validate each unit of code. Each application will typically require hundreds or even thousands of tests to successfully validate the code.

Like the application itself, the success of the unit tests depends on how they are written. Code Contracts, available since the debut of .NET framework 4, go hand in hand with unit testing. They enable the developer to define preconditions, postconditions and class invariants, and require code to be embedded in a developer's existing classes.

As a developer is going through the testing phase of application development, they will typically take the app through unit testing, where several small tests validate each unit of code. Each application will typically require hundreds or even thousands of tests to successfully validate the code.

View Article



Comments

  • There are no comments yet. Be the first to comment!

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Featuring Doug Kaplan, Director of Customer Success at InfoArmor Live Event Date: October 26, 2016 @ 10 AM PT / 1 PM ET We'll be highlighting InfoArmor, a solution provider for identity protection software, who recently made the move to a cloud contact center to support their advanced threat protection services offered to their large user base in the cloud. Join InfoArmor and Genesys to hear: An insider view of how InfoArmor built a justification and gained consensus to make the move to the cloud Tips on …

  • If you're like most businesses, you probably assume that for faxing must involve the ineffective and costly environment of clunky hardware and costly phone lines. But you'd be wrong. Cloud-based, paperless hosted faxing service require no onsite hardware, are as easy to use as email, reduces costs, and enhances the security and regulatory compliance of your business faxes. Read this white paper for learn ten benefits a business like yours will enjoy when you switch from your existing analog fax infrastructure …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date