2
我正在寻找一种方法来单元测试我通过我的WCF接口发回的所有DTO。我想避免像以下运行时错误:单元测试捕获WCF中的InvalidDataContractException
System.Runtime.Serialization.InvalidDataContractException
No set method for property 'Bar' in type 'Foo'.
例如,在下面我想单元测试捕捉上述异常。
[DataContract]
public class Foo
{
[DataMember]
public decimal Bar { get { return 0; } }
}
的[有没有人创造了一个DataContract测试工具?(https://stackoverflow.com/questions/970828/has-anyone-created-a-datacontract-testing-tool) – thomasb 2018-01-16 11:05:09