Test Class Inheritance Revisited

Some years ago I used to use inheritance in my unit test class design, mainly to avoid code duplication. When VS2005 introduced unit tests, this was one of the most requested features.. but with time, it has been forgotten. Today, I was creating some integration tests that called a WCF service, so I was changing…

How to connect to TFS through authenticated Web Proxy

Today I was in a customer where the internet access is provided by a WebProxy that requires credentials. For some reason, although VS can navigate, the Team Explorer was not able to connect to our TFS server, because a 407 error (Proxy authentication required) To fix this issue you need a custom proxy module that…


Sorprendente Assert

Estoy revisando el código de un componente, y sorprendentemente tiene pruebas unitarias…. ¿y que me encuentro? Assert.IsTrue(1 != 1, "Se ha producido un error La verdad, para escribir esto … mejor me voy a dormir


The webHttpBinding Magic (another Spotify WCF Client)

One of the most common programming tasks today is to manage a series of WebRequests, mostly HttpRequests. In .Net we have been using the system.net.httpwebrequest.aspx  class and friends like system.net.webclient.aspx to manage the URL I/O. If you need a “C# parameter to queryString converter” you have to build your own, and so on… Lastly I’ve…


I’ve been interesting in unit testing for some years now. One major aspect of unit testing is about how use designs that allows a separation of concerns so you can test your program as units (usually at class level), for this the interface basic programming is a MUST. Once you start with interfaces, you will…

Debugging VB6 code with Visual Studio 2008

I was reviewing an old DNA app (more on this in a different post) and I got really surprised when I saw that  we can debug VB6 code with VS2008 !!!



Since gotdotnet is phased out, I’m moving all my samples to codeplex (http://www.codeplex.com/ridocode), including the famous FileRollerTraceListener


TestResults Reports in TFS Builds

If you use TFSBuilds with VS UnitTests, you know how to inspect the TestResults: you must download the whole directory to your local machine, and sometimes this folder could be pretty huge. So, if you want to check the error details of your tests, you can use my tool trx2html to convert the *.trx files to…


Testing with VS2005 Demo

Today’s workshop was based on a demo to show all the vs features about testing, it covers: Unit Tests (With MockObjects) Integration Tests (Using ASP.Net Host) Functional Tests (With Web Tests) Load Tests (With testcontrollers and test agents)  I’ve packed all the code in a zip that you can download here: http://blogs.msdn.com/rido/attachment/1159890.ashx   DemoVSTesting.zip


Mocking SQLException

I’m working on a presentation about Testing, and one of the technics I would like to show is MockObjects. One of the mock objects I want to create is a DataAccess Layer, and this one should throw SqlExceptions, however the SqlException class is sealed and has no public constructor.   I found a comment about it here: http://www.taylor.se/blog/2006/06/09/mocking-sqlexception/ But the…