如何为 Visual Studio 2015 RC / .NET Core 项目创建单元测试?

How to I create a unit test for a Visual Studio 2015 RC / .NET Core project?

我刚刚开始使用新的 Visual Studio 2015 RC,但我 运行 遇到了一个问题,因为我似乎找不到一个示例项目来说明如何对新的 .NET COre 代码进行单元测试。一个例子,甚至被指向正确的方向都会非常有帮助。谢谢....

你应该看看 xUnit, it was written by the author of nUnit, it's compatible with all of the new vNext goodness (Asp.Net 5, Universal Apps, and Xamirin, CoreClr) and it's what the tests for MVC vNext 中写的。它也适用于 nCrunch。

您可以从 nuget 安装它。