Feeds:
Posts
Comments

Archive for January, 2010

Howdy folks, Here we are back again with an introduction of the new features of the upcoming Visual Studio 2010. Its release has been postponed to the 12th of April, so in the meantime we’ll have to stick to the Beta 2, which is pretty stable already. There are so many improvements that we’ll have [...]

Read Full Post »

Dear community, It’s me once more with a small but handy hint that can make your coding and maintaining a bit easier. When mapping columns to integral types, it certainly is possible that a field’s value is NULL, right? Now, let’s assume a hypothetical table ORDER that contains a field QUANTITY. Assume also that we [...]

Read Full Post »

Howdy all, Here comes another post about Code Contracts. Remember my post First Steps with Code Contracts? Let’s just recall which class we have been working on last time: 1: namespace Vehicles 2: { 3: class Car : IVehicle 4: { 5: string name; 6: int speed; 7: 8: public Car(string name, int speed) 9: [...]

Read Full Post »

Howdy, The Code Contracts User Manual holds (besides detailed information about Code Contracts’ usage, advantages and drawbacks) a few nice lists of Code Snippets that ship with the Code Contracts and will ease your life. Find below the list of available Code Snippets for the C# language, as exactly taken from the User Manual (January [...]

Read Full Post »

Howdy ladies and gents out there, Here we go with another NHibernate common problem solved for you. Recently the question arose whether it is possible or not to execute a query with NHibernate that checks whether a property lies in a given range of values or not. Not much of a problem, we would say, [...]

Read Full Post »

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: [...]

Read Full Post »

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

Read Full Post »

Howdy folks, So far, we have seen how to let Pex automatically generate unit tests, and how to generate PUT customizations while testing interfaces. However, there are a few cases you might come across, where Pex cannot generate test cases for your code. This is the case, if you try to test code that is: [...]

Read Full Post »

Howdy, In reference to my previous post, Pex: Parametrized Unit Tests and their Customization, I’d like to publish an update: I received an interesting comment by Peli, that the following code piece should be replaced by a lambda expression, in order to make it more readable. Hence, I’d advice that you should just replace the [...]

Read Full Post »

Hello, You might already guess it: Pex won’t let me go, and so I’d like to explain in short a few of Pex’ concepts. 1.1 Code Coverage Pex is an abbreviation for Program Exploration. You guessed it: Nomen est omen. It analyzes the branches (if, then, else, etc…) of control flow and tries to cover [...]

Read Full Post »

Older Posts »

Follow

Get every new post delivered to your Inbox.