是否可以将 xUnit 与 LINQPad 一起使用? [英] Is it possible to use xUnit with LINQPad?

查看:42
本文介绍了是否可以将 xUnit 与 LINQPad 一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将 xUnit 与 LINQPad 一起使用?

Is it possible to use xUnit with LINQPad?

能够首先为在 LINQPad 中设计的概念编写一些测试会很棒.为了能够快速编写一些单元测试,这比添加另一个 ConsoleApp23423894238 更容易.

It would be great to be able to write some tests for concepts being designed in LINQPad first. It's easier than adding yet another ConsoleApp23423894238 just to be able to quickly write some unit tests.

推荐答案

可能吗?有点.

这既不是 LINQPad 的主要用例,也不是单元测试的主要用例.

This is neither a main use case of LINQPad nor of unit testing.

关于 LINQPad,您可以使用现有的测试运行器,但可能唯一可以与 LINQPad 集成的测试运行器是控制台运行器.测试运行器不是一个简单的程序.试试 Xunit.Runner.LinqPad.

Regarding LINQPad, you could use an existing test runner but probably the only ones that could be integrated with LINQPad are console runners. A test runner is not a trivial program. Try Xunit.Runner.LinqPad.

至于需要为正在设计的概念编写一些测试",请考虑如果您认为它们没有足够的价值来创建项目并将其保留在源代码控制中,那么您可能无法从单元测试工作流中获得足够的收益.获得更多价值的一种方法是使用行为驱动开发 (BDD),如果您想以业务可读的语言编写需求,请尝试使用 SpecFlow 之类的方法.

As for needing to "write some tests for concepts being designed", consider that you might not be getting enough out of your unit testing workflow if you don't find them valuable enough to create a project and keep it in source control. One way to get more value is to use Behavior-Driven Development (BDD) and if you want to write the requirements in a business-readable language, try something like SpecFlow.

这篇关于是否可以将 xUnit 与 LINQPad 一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆