Gallio 错误“探索测试时抛出异常。”
您好,我在 VisualStudio 2010 中有一个使用 Gallio 3.2 b.435 的测试项目。每次我启动任何测试时,都会弹出输出窗口。
这是错误消息
[error] An exception was thrown while exploring tests.
Location: C:\xxxxxxx(73)
Details: System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
这是指定行的代码
71: [Test, ExpectedException(typeof(RulesException<Story>))]
72: public void CanNotSaveItemIfInvalid()
73: {
74: var story= new Story{ Id = 100, Tilte= "test" };
75: repository.Save(story, new MembershipUser());
76: }
无论正在测试什么测试都会抛出此错误(该项目包含 700 个测试) 当然;)测试编译并通过,但我无法理解该错误。
再见斯特凡诺
Hi I have a test project with Gallio 3.2 b.435 within VisualStudio 2010. Every time I launch any test the output windows pops out.
this is the error message
[error] An exception was thrown while exploring tests.
Location: C:\xxxxxxx(73)
Details: System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
this is the code at the line specified
71: [Test, ExpectedException(typeof(RulesException<Story>))]
72: public void CanNotSaveItemIfInvalid()
73: {
74: var story= new Story{ Id = 100, Tilte= "test" };
75: repository.Save(story, new MembershipUser());
76: }
This error isthrown no metter what test is under testing (the project contains 700 test)
Of course ;) the test compiles and passes and I cannot understand the error.
bye Stefano
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此错误是已知问题。这是由于 Gallio 核心引擎使用的早期版本 Mono.Cecil (v0.6) 中的一个错误造成的。最近已修复:Gallio 现在使用 Mono.Cecil v0.9。
请尝试 最新版本 Gallio (v3.2.2)
This error is a known issue. It's due to a bug in the early version of Mono.Cecil (v0.6) that was used by the Gallio core engine. It has been fixed recently: Gallio is now using Mono.Cecil v0.9.
Please try out the latest version of Gallio (v3.2.2)