Sometimes you know the unit is over because there is some kind of test.
因为有某种测试,有时你会知道单元结束了。
Many developers use a variant of testing called test-after development (TAD), whereby you write the code and then write the unit tests.
许多开发人员使用称为后测试开发(TAD)的各种测试,你首先编写代码,然后编写单元测试。
NOTE: We strongly recommend that you create a unit test for your unit test component (see figure 1).
注意:在此强烈建议为您的单元测试组件(见图1)创建一个单元测试。
It's difficult to write a unit test if there's no unit to test.
如果没有可测试的单元,那么就很难编写出单元测试。
Therefore, we took the approach of using Rational Manual Tester, and we associated a test file that contained only the test unit within each configured test case.
因此,我们采取利用RationalManualTester的方法,并将一个仅包含一个测试单元的测试文档与每一个已配置测试用例联合起来。
To run this unit test, create a run configuration for the unit test class as a test: : unit type.
要运行这个单元测试,应该为单元测试类创建一个Test:Unit类型的Run配置。
Now, I need a test-after unit test to determine if it works or not.
现在,我需要一个后测试的单元测试以确定它是否可以工作。
The first 14-foot test unit produced enough energy to supply 150 average European homes and saved the emission of over 450 tons of CO 2 greenhouse gas each year.
其首个14英尺高的试验装置所产生的电能足以供给平均150户欧洲家庭,从而每年消减超过450万吨的二氧化碳温室气体排放。
When Grails created the service for you, it added the corresponding test to the test/unit directory.
当Grails为您创建服务时,它将把相应的测试添加到test/unit目录。
In the Team Room application path's test \ unit subdirectory, you will find.rb files which correspond to all model objects created through scaffolding.
在TeamRoom应用程序路径的test \unit子目录中,可以找到与所有(通过框架创建的)模型对象对应的. rb文件。
This fills the role of "traditional" Rails integration testing, using test: Unit, as well as having other USES such as acceptance tests.
这一机制用来充当“传统”Rails中集成测试(使用Test:Unit)的角色,同时也可以在其他诸如验收测试中发挥作用。
When using these test stubs, "require 'test/unit'" does not need to be specified.
在使用这些测试存根时,不需要指定 “require'test/unit'”。
To verify that the redirect happens as expected, add a testIndex() method to test/unit/UserControllerTests.groovy, as shown in Listing 19
要验证是否按预期发生了重定向,将一个testIndex()方法添加到test/unit/UserControllerTests.groovy,如清单 19 所示
Listing 7. The test \ unit path listing.
清单7.test \unit路径列表。
The project will comprise of a 30-tonne test unit that will process 1, 000 cubic metres of exhaust gas per hour.
这个项目包括一个30吨规模的实验,将每小时处理1000立方米的废气。
When we are creating test scripts under the test\unit subdirectory, the require 'test/unit'statement does not need to be specified.
在test\unit子目录下创建测试脚本时,不需要指定require'test/unit' 语句。
To work around this, the original test/unit was extracted into a gem.
test/unit是被分离出来做为一个gem包。
That comes before the stdlib dir in $LOAD_PATH so it'll take over for test/unit.
这发生在stdlibdirin $LOAD_PATH,所以这不会影响test/unit。
The Test::Unit assertion follows a basic pattern, whereby the first parameter is the result expected and the second parameter is the actual result.
Unit断言采用一种基本模式:第一个参数是预期的结果,第二个参数是实际结果。
Ryan just released miniunit 1.2, with a call to users to find discrepancies between it and test/unit. Ryan explains how to use miniunit
Ryan最近发布了miniunit 1.2,并呼吁用户认识到它和test/unit的不同。
Once you've done that, you can gradually change from Test::Unit to Rspec syntax. TestCases can be changed gradually to example groups; tests to examples; and assertions to expectations.
采用这一方式,您就可以逐渐的从Test::Unit过渡到Rspec格式,渐进的完成TestCases到examplegroups、tests到examples和assertions到expectations的转换。
This statement will load the Test: : Unit module.
这个语句将装载test:Unit模块。
After the require statement, a class declaration stating that this class is a subclass of Test: : Unit: : TestCase must be added (as shown in below in Listing 6).
在require语句后面,添加一个类声明,指出这个类是Test: Unit:TestCase的子类(见清单6)。
File templates for creating Test::Unit and Test/Spec tests
Unit和Test/Spec测试的文件模版
Though the test unit with the high altitude fan engaged has diminished less over the first 100 hours of use, this was a much brighter unit to begin with.
虽然那台测试样机开启高海拔模式后使用100小时亮度削弱的更多,但那台也是所有样机中初始亮度更高的一台。
My test unit also came with an odd little add-on microphone poking out from the bottom, even though it had a built-in mic at the top.
我测试的这台电脑还有一个古怪的外置麦克风,从机器底部伸出来,而其实电脑顶部已经有了一个内置麦克风。
The experimental study on the relationship between annulus pressure differential, interlayer differential and cementing quality is carried out on the lab simulation test unit.
室内利用模拟试验装置进行了环空压差和层间压差与固井质量的关系的试验研究。
This article presents the common technology on casing hydrostatic test and the improving design of the casing hydrostatic test unit in Daqing.
本文介绍石油套管水压试验的常见工艺以及大庆对套管水压试验装置的改进设计。
This article presents the common technology on casing hydrostatic test and the improving design of the casing hydrostatic test unit in Daqing.
本文介绍石油套管水压试验的常见工艺以及大庆对套管水压试验装置的改进设计。
应用推荐