以前在我的 Fitnesse 夹具中,我使用以下方法指定了预期的 WCF 异常:
exception[FaultException]
从那以后,我将 WCF 服务转换为返回强类型的 FaultContract。我现在收到以下失败消息:
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."]
这并不意外,但如何检查强类型错误异常?请注意,我不能将故障消息包含在检查中,因为它包含更改的日期(我单独检查)。