完整的代码覆盖率

发布于 2024-08-09 03:35:33 字数 210 浏览 4 评论 0原文

我正在尝试获取以下代码行的完整代码覆盖率...

stringWriter.Write(HtmlEncodedString.Format(string.Format("{0,-10:C}", x + y)))

这一行上面的行显示为完全覆盖,并且只是写出一个字符串,但这一行仅显示为部分覆盖。

有人知道如何使这条线完全覆盖吗?

I'm trying to obtain full code coverage for the following line of code...

stringWriter.Write(HtmlEncodedString.Format(string.Format("{0,-10:C}", x + y)))

The line above this one is showing as fully covered and is just writing out a string but this one is only showing as partially covered.

Anybody have any ideas how I can make this line fully covered?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

狂之美人 2024-08-16 03:35:33

是否存在您的测试当前未触发的 Format() 方法的返回代码或异常?

Are there perhaps return codes or exceptions from either of the Format() methods that your tests do not currently trigger?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文