【文件属性】:
文件名称:AssertHelper:一个断言来统治他们!
文件大小:2.64MB
文件格式:ZIP
更新时间:2021-05-02 14:07:24
C#
断言助手
一言以蔽之!
支持NUnit和MSTest
使用Expect.That和表达式告诉您的单元测试要检查的内容:
Expect.That(()=> value == true)→断言IsTrue
Expect.That(()=> value == false)→断言。
Expect.That(()=> value == null)→断言IsNull
Expect.That(()=> value!= null)→断言。
Expect.That(()=>结果==预期)→Assert.AreEqual
Expect.That(()=>结果!=预期)→Assert.AreNotEqual
Expect.That(()=>结果为ExpectedType)→Assert.IsInstanceOfType
Expect.That(()=> aString.StartsWith(s