juin 01
In some cases, you need to write unit tests that will access an HttpContext. Fortunately MsTest provides you with some functionality to achieve this.

We'll see here how we can do that, but also a best practice to have a test that will work on any computer and on the build server, without any special configuration needed. [Plus]
Tags: | |
avr. 18
If you need to create a thumbnial on the fly of a given image, it is quite easy to do in C# as the Image object include a GetThumbnailImage method.
Anyway, there is another method that will generate cleaner thumbnails, for any types of images. [Plus]
avr. 16
Recently, I was needed to order all the pictures that where taken during an event, but by different photographers. In Windows Explorer you can simply add a column "Date Taken" but how can we do the same by code ? [Plus]
juil. 03
Recently, I was playing with WatiN to do some integration and web testing, and I have "discovered" the concept of session merging in the browsers.

Of course, that's an important feature allowing to deal correctly with popups dfor instance. But when you do some web testing and that you would like to launch several browser logged in with different users to check simultaneous actions or things like that, this feature can be very very annoying.

Internet Explorer 8 has added a new feature that allow you to surf in a new session, meaning you just deactivate explicitely the session merging. You can do that via the interface of in command line (IExplore.exe about:blank -nomerge)

What I will show here is how we can benefit from that feature in COM using the WatiN API. [Plus]
juin 12
Here, I will be using the tool NDepend - an analysis tool by Patrick Smacchia - to extract the call tree - the method dependencies - of an assembly.
We will see how we can do that using the menus of the tool, and also using the CQL (a SQL-like language to run queries against code to extract metrics) and more specifically functions like IsUsedBy, DepthOfIsUsedBy or NbLinesOfCode. [Plus]