“Attempting to resolve dependency 'xunit'. Attempting to resolve dependency 'xunit.core (= 2.0.0-rc1-build2826)'. 'xunit.core' already has a dependency defined for 'xunit.extensibility.core'.”,原因是nuget的版本需要update。
具体的做法:
Tools > Extensions and Updates > Updates > Visual Studio Gallery 下update NuGet itself
然后安装xunit.runner, VS就会检查到用户的test
2,调出2012的测试资源管理器
测试-》窗口-》测试资源管理器
3,书写代码:
namespace chsarpsdk.Qiniu.Test.Http
{
public class httptest1
{
[Fact]
public void TestAdd()
{
Assert.Equal<int>(5, 2 + 1);
Console.WriteLine("woaini");
}
[Fact]
public void testMax()
{
Assert.Equal(3, Math.Max(3, 2));
}