Browse by Tags
All Tags »
C# (
RSS)
Mocking HttpRequest and HttpResponse is not complicated with HttpRequestBase and HttpResponseBase introduced in ASP.NET. I had to mock ServerVariables property of HttpRequest and run into an issue – I was accessing an indexer property and didn’t know...
Writing a Custom ConfigurationSection is not a big task, but can be very challenging if you forget some details. I loved this post as it reminded me that you have to have both the Section tag and the collection within it tag… dah!
Asserting arguments is essentially a healthy practice. What I don’t like, is the fact that since day one ArgumentNullException used a string for argument name, and now with .NET 4.5 almost knocking on the door, there’s still only string option. if (x...
A few years ago I have blogged about Singletonitis . Another place, different people, yet the same problem appears again – singletonitis. The issues I have outlined back then where 1. Testing 2. Difficulty to replace implementation 3. Requirement to track...
When doing testing, I tend to create an object mother for the items generated multiple times for specifications. Quite often these objects need to be a part of a collection. A neat way to do so is to leverage .NET params mechanism: public static IEnumerable<T>...
Row tests are fun. You can simulate various inputs with expected outputs and execute them all with a single observation (test). The problem for myself was always the fact that when this was done, the only way to accomplish it was to merge the logical...
In my previous blog about consuming WCF service from BizTalk orchestration I wrote about how we’d invoke a service based on a document coming in and mapping it into the service request schema. This time I had the input for the service coming from a context...
I am looking at the code for Silverlight application and there’s something that just bugs me… INotifyPropertyChanged. This is not the first time, and yet again I see this interface implemented again, and again, and again. This violates several good principles...
This is something trivial, yet got me to think for a little. I had two checksums, one received from a client invoking a service, another one calculated once data sent into service is received. Checksums are plain arrays of bytes. I wanted to have comparison...
log4net is a great facility to create logs. When it comes to extending it, it’s good as well. To add a custom property to a custom appender that can be configured from configuration XML file is so simple, that it even looks suspicious. Custom appender...
More Posts
Next page »