I have a unit test that is failing because a System.ArgumentException
is being thrown, even though I am expecting it and it's deliberate behaviour - what have I missed?
[Test]
[ExpectedException(typeof(ArgumentException), ExpectedMessage = "Seconds from midnight cannot be more than 86400 in 010100712386401000000012")]
public void TestParsingCustomReferenceWithInValidSecondsFromMidnight()
{
// I am expecting this method to throw an ArgumentException:
CustomReference.Parse("010100712386401000000012");
}
I've also tried without the ExpectedMessage
being set - no difference.