Hello all, This time we’ll do a quick exploration of how we can apply Code Contracts to interfaces. As you know from our post First Steps with Code Contracts, the preconditions and postconditions (Contract.Requires and Contract.Ensures calls, respectively) must be placed inside a method body. Therefore, when defining an interface, we run into a problem: [...]
Posts Tagged ‘precondition’
Code Contracts on Interfaces
Posted in Uncategorized, tagged Code Contracts, Design by Contract, interfaces, ms_feeds, precondition, visual studio, windows7 on January 22, 2010 | Leave a Comment »
First Steps with Code Contracts
Posted in Automation, c#, Code Contracts, Unit testing, tagged Assertions, Code Contracts, Design by Contract, ms_feeds, postcondition, precondition, Tools, Visual Studio 2010, windows7 on January 21, 2010 | 4 Comments »
Hello all, Today we are going to talk about another exciting project from the Microsoft Research Labs: Code Contracts. It is a Design-By-Contract (DbC) system, that enables us as developers to formulate the expected behaviour of our code by directly putting it into the code. The main tools of applying Code Contracts are: Static checking [...]

