如何在Fitnesse中捕获常规故障异常?

时间:2010-03-09 15:47:05

标签: fitnesse

以前在我的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."] 

这不是意料之外的,但如何检查强类型故障异常?请注意我不能在检查中包含故障信息,因为它包含更改的日期(我单独检查)。

1 个答案:

答案 0 :(得分:3)

尝试指定正在生成的异常名称:exception [FaultException`1]

如果异常类型是通用的,我添加了一个使用完整泛型类型名称的问题。 http://github.com/jediwhale/fitsharp/issues/issue/44

相关问题