在将xunit用于.NET 1.0框架net46时,我一直收到此错误.
I keep getting this error while using xunit for .NET 1.0 framework net46.
The following constructor parameters did not have matching fixture data我看过这篇文章:收藏夹不会注入,并按照有关如下所述紧密收集夹具:
I have seen this post: Collection fixture won't inject and followed the instructions regarding collection fixture closely as described here:
xunit.github.io/docs/shared-context.html#collection-fixture
似乎没有任何作用.
有什么建议可能导致这种情况吗?
Any suggestions to what might cause this?
推荐答案在我看来,这是按照说明正确执行操作的问题.我误把班级注释为
In my case it turned out to be a matter of doing it right according to the instructions. By mistake I had annotated the class with
[Collection("ProjectCollection")]代替:
[Collection("ActorProjectCollection")]我必须说,如果错误消息更加明确地指出了错误所在,则XUnit的依赖项注入机制将得到极大改善.
I must say that the dependency injection mechanism of XUnit would be greatly improved if the error messages gave more explicit hint of what is wrong.
更多推荐
Xunit以下构造函数参数没有匹配的夹具数据
发布评论