tags:

views:

74

answers:

1

Previously within my Fitnesse fixture I was specifying an expected WCF exception using:

exception[FaultException]

Since then I have converted the WCF service to return a strongly typed FaultContract. I am now getting the following failure message:

exception[FaultException`1: "A file with the name DMS Documents/testFileWord.doc already exists. It was last modified by SHAREPOINT\system on 09 Mar 2010 15:36:14 -0000."] 

This is not unexpected but how do I check for strongly typed fault exceptions? Please note I cannot include the fault message as part of the check as it contains a date which changes (I check this separately).

+1  A: 

Try specifying the exception name that's being generated: exception[FaultException`1]

I've added an issue to use the full generic type name if the exception type is generic. http://github.com/jediwhale/fitsharp/issues/issue/44

Mike Stockdale
That worked, funny I was sure I tried that. Thanks for submitting the issue having the full generic type would be a big improvement.
Dan Ryan