Blog from January, 2011

The Exception you did not expect

The following test is green in resharper test runner.

[Test]
[ExpectedException(typeof(ArgumentOutOfRangeException))]
public void ReadOnly()
{
     throw new InvalidOperationException();
}

So make sure you check the message as well like this

        [Test]
        [ExpectedException(typeof(ArgumentOutOfRangeException),ExpectedMessage = "hoi")]
        public void ReadOnly()
        {
            throw new InvalidOperationException("kees");      
        }

The last test does show up red.

Build server statistics (NUnit)

Workload of build agens

Statistics of Delta Shell NUnit configuration