我的测试显示以下xUnit。净产量:
[xUnit.net 00:00:07.1166826] Expected: HashSet<License> [Comp.Licensing.Web.Model.License [5d8104ef-f707-4a40-9d68-463bf9f8b0f9], Comp.Licensing.Web.Model.License [d586fc23-bba6-474c-82a2-226484d7fb81]]
[xUnit.net 00:00:07.1172482] Actual: HashSet<License> [Comp.Licensing.Web.Model.License [d586fc23-bba6-474c-82a2-226484d7fb81], Comp.Licensing.Web.Model.License [5d8104ef-f707-4a40-9d68-463bf9f8b0f9]]
我不明白的是为什么这个测试失败了,似乎原因是哈希集出了问题。
具体来说,似乎
真实的
实际:
HashSet<L> [Stuff [abc], Stuff [123]]
HashSet<L> [Stuff [123], Stuff [abc]]
在文档上
HashSet
,它说
我的测试是否由不使用相同哈希集等式检查的程序运行?