FluentAssertions.Web:.Net Web Api项目的FluentAssertions

时间:2021-02-16 04:56:28
【文件属性】:
文件名称:FluentAssertions.Web:.Net Web Api项目的FluentAssertions
文件大小:486KB
文件格式:ZIP
更新时间:2021-02-16 04:56:28
c-sharp unit-testing netcore functional-testing asp-net-core FluentAssertions.Web 这是HttpResponseMessage的扩展,以帮助使用Assert部分,并在Fail部分中提取足够的信息,从而减少了调试时间。 努吉特 PM>安装包FluentAssertions.Web 为什么? 我最近经常使用进行功能测试,因此编写了一些重复的代码或在调试中花费了很多时间。 使用此工具,我打算解决两个问题: 关注于断言而不关注与HttpClient相关的API,也不关注序列化/反序列化 响应准备就绪后,您将需要声明它。 使用诸如StatusCode类的第一级属性在某种程度上很容易,尤其是对于FluentAssertions而言,但是我们经常需要更多,例如将内容反序列化为某种类型的对象然后进行断言。 或者只是声明有关响应内容本身的内容。 很快就会出现重复代码,减少重复代码的欲望只是下一步的逻辑。 专注于编写功能测试,而不是调试事物 测试
【文件预览】:
FluentAssertions.Web-master
----.gitignore(4KB)
----src()
--------FluentAssertions.Web()
----samples()
--------Sample.Api.Net22()
--------Sample.Api.Net22.Tests()
--------Sample.Api.Net30()
--------Sample.Api.Net30.Tests()
----LICENSE(11KB)
----FluentAssertions.Web.sln(5KB)
----appveyor.yml(2KB)
----readme.md(14KB)
----.gitattributes(2KB)
----docs()
--------images()
--------AspNetCore22DeveloperPage.html(18KB)
----test()
--------FluentAssertions.Web.IntegrationTests()
--------FluentAssertions.Web.Tests()

网友评论