And*_*ira 2 .net c# xunit.net .net-core
我正在使用dotnet核心开发一个应用程序.当我尝试运行单元测试时,收到以下消息:
The active test run was aborted. Reason: Unable to communicate with test host process.
Run Code Online (Sandbox Code Playgroud)
我已经检查了我的.csproj文件,我已经卸载并再次安装dotnet核心,试图重建项目,尝试再次恢复包,搜索代码错误,但我不知道发生了什么.
我正在使用Ubuntu 16.04.
可以在此处找到面临该问题的项目:https://github.com/andremteixeira/Personal-Accounting
您创建了一个堆栈溢出异常,但遗憾的是它完全崩溃了测试主机进程.
问题是:
CheckNullityCheckNullity有一个a == null比较bool operator == (Money a, Money b)bool IsEquivalent(Money a, Money b)a != nullbool operator != (Money a, Money b)a == null如果我更换
if (a == null || b == null)
Run Code Online (Sandbox Code Playgroud)
同
if (Object.ReferenceEquals(a, null) || Object.ReferenceEquals(b, null))
Run Code Online (Sandbox Code Playgroud)
在CheckNullity它打破循环和所有测试运行.
| 归档时间: |
|
| 查看次数: |
1411 次 |
| 最近记录: |