作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个测试用例,看起来像:
namespace UnitTests
[<TestFixture>]
module ValidatorTests =
[<Test>]
let VerifyBasicFunctionality () =
Assert.That(bool)
Assert.That(bool)
$ nunit-console4 bin/Release/UnitTests.dll
NUnit version 2.4.8
Copyright (C) 2002-2007 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.
Runtime Environment -
OS Version: Unix 15.6.0.0
CLR Version: 4.0.30319.42000 ( 4.4.2 (Stable 4.4.2.11/f72fe45 Thu Aug 11 06:03:25 BST 2016) )
.N.N.N
Tests run: 0, Failures: 0, Not run: 3, Time: 0.011 seconds
-xmlConsole
运行它时标志,我明白了:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!--This file represents the results of running a test suite-->
<test-results name="bin/Release/UnitTests.dll" total="0" failures="0" not-run="3" date="2016-09-08" time="10:26:00">
<environment nunit-version="2.4.8.0" clr-version="4.0.30319.42000" os-version="Unix 15.6.0.0" platform="Unix" cwd="/SOMEUSER/SOMEPATH/UnitTests" machine-name="gmaini-m.jet.local" user="SOMEUSER" user-domain="SOMELOCALBOX" />
<culture-info current-culture="en-US" current-uiculture="en-US" />
<test-suite name="bin/Release/UnitTests.dll" success="True" time="0.010" asserts="0">
<results>
<test-suite name="UnitTests" success="True" time="0.008" asserts="0">
<results>
<test-suite name="ValidatorTests" success="True" time="0.001" asserts="0">
<results>
<test-case name="UnitTests.ValidatorTests.VerifyBasicFunctionality" executed="False">
<reason>
<message><![CDATA[UnitTests.ValidatorTests is an abstract class]]></message>
</reason>
</test-case>
<test-case name="UnitTests.ValidatorTests.VerifyBasicOtherFunctionality" executed="False">
<reason>
<message><![CDATA[UnitTests.ValidatorTests is an abstract class]]></message>
</reason>
</test-case>
<test-case name="UnitTests.ValidatorTests.VerifyBasicSomeFunctionality" executed="False">
<reason>
<message><![CDATA[UnitTests.ValidatorTests is an abstract class]]></message>
</reason>
</test-case>
</results>
</test-suite>
</results>
</test-suite>
</results>
-run="Namespace.Module.Function"
访问它们。并与
-fixture="Namespace"
谈论夹具但它不会运行它们?是
UnitTests.ValidatorTests.VerifyBasicFunctionality is an abstract class
暗示存在一些 C# 互操作问题?
最佳答案
这个修复是:
namespace UnitTests
[<TestFixtureAttribute>]
type ValidatorTests () =
[<Test>]
member __.VerifyBasicFunctionality() =
Assert.That(bool)
Assert.That(bool)
关于unit-testing - NUnit 没有运行我的测试用例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39394442/
我最近购买了《C 编程语言》并尝试了 Ex 1-8这是代码 #include #include #include /* * */ int main() { int nl,nt,nb;
早上好!我有一个变量“var”,可能为 0。我检查该变量是否为空,如果不是,我将该变量保存在 php session 中,然后调用另一个页面。在这个新页面中,我检查我创建的 session 是否为空,
我正在努力完成 Learn Python the Hard Way ex.25,但我无法理解某些事情。这是脚本: def break_words(stuff): """this functio
我是一名优秀的程序员,十分优秀!