Yesterday, we had a math class test.
昨天,我们班进行了一次数学测验。
The ID test took only 218 ms, while the CLASS test took 19.9 seconds!
ID测试耗时218毫秒,而CLASS测试耗时19.9秒!
And the corresponding Scitter class test in Listing 7 is pretty simple too.
清单7中相应的scitter类测试也相当简单。
He suggested a link between class size and test results of seven-year-olds.
他建议把7岁儿童的班级大小和考试结果相关联。
We test your English before deciding which class to put you in.
我们测验过你的英语后再决定把你分在哪一班。
Once every class has at least one test, write one test for every method.
当每个类都有了至少一个测试,再为每一个方法编写一个测试。
Once every package has at least one test, write one test for every class.
当每个程序包都有了至少一个测试,再为每一个类编写一个测试。
Add the code shown in Listing 6 to the test class.
添加如列表6所示的代码到这个测试类中。
Paste this code into your test class and save it.
将此代码粘帖到您的测试类,并保存。
To keep the code simple, I put the class and the test code in one file.
为了保持代码简单,我把类和测试代码放在一个文件中。
To understand how to use this, we need a test class.
为了弄清除如何使用它,我们需要写一个测试类。
You now have your test class available for execution.
您现在已经拥有了可用于执行的测试类。
You also use this class to run test packages.
您也可以用这个类来运行测试包。
The first option is to move this test class into the integration directory.
第一个选择是将此测试类转移到集成目录中。
Once you have your test class, the real action happens in your test methods.
一旦创建好测试类之后,测试方法中要有实际的动作。
Make an inner class in the parent class, which is a test case.
在父类中建立一个内部类,这个内部类是个测试用例。
Each time you save the source file, you invoke a parsing of the test class.
你每次保存这些源文件时,便调用测试类的解析。
Here is the generated test case class for our simple example.
下面是我们的简单示例所生成的测试用例类。
Sure you can whip out a class without a test.
在只有一个类时,您当然可以叫嚷着不需要测试。
Listing 3 shows the dictionary application's beginning test class.
清单3显示了字典应用程序的开始测试类。
Now imagine trying to unit test a class that makes an expensive SOAP call.
现在,想像一下对发出开销较高的SOAP调用的类进行单元测试。
Optionally the test class name can be changed.
这个测试类的名称可以更改。
If a unit test crosses class boundaries, it might be a functional test.
如果单元测试跨越类边界,则它就可能是功能测试。
You wouldn't want to test every class for this new behavior.
我们不想对每一个类测试这个新行为。
Within the UML model create a test package and class.
在uml模型中,创建一个测试包和类。
The lifecycle of a test class is further illustrated in Figure 2.
图2进一步描述了测试类的生命周期。
Observe in the Test pane that the project and test class values are filled in.
检查测试窗格,将看到项目和测试类值已填充。
Optionally the name of the test class can be changed.
测试类的名称也可以修改。
Running this test class produces the expected result
运行这个测试类产生的预期结果
We now we have our test class available for execution in two contexts.
现在,我们可以使测试类在以下两个上下文中执行测试。
应用推荐