Optionally the test class name can be changed.
这个测试类的名称可以更改。
Paste this code into your test class and save it.
将此代码粘帖到您的测试类,并保存。
Add the code shown in Listing 6 to the test class.
添加如列表6所示的代码到这个测试类中。
To understand how to use this, we need a test class.
为了弄清除如何使用它,我们需要写一个测试类。
Running this test class produces the expected result
运行这个测试类产生的预期结果
You now have your test class available for execution.
您现在已经拥有了可用于执行的测试类。
Optionally the name of the test class can be changed.
测试类的名称也可以修改。
Create a new database unit test inside a new test class.
在新的测试类别内建立新的资料库单元测试。
It is also added as a new test method in the test class.
它也会以测试类别中的新测试方法形式加入。
Here's an example. Consider the test class in Listing 11.
这里有一个例子。
The lifecycle of a test class is further illustrated in Figure 2.
图2进一步描述了测试类的生命周期。
Listing 3 shows the dictionary application's beginning test class.
清单3显示了字典应用程序的开始测试类。
Create a new database unit test inside an existing test class.
在现有的测试类别内建立新的资料库单元测试。
A simple test class for the special Facebook user is presented below
特殊Facebook用户的简单测试类如下
We now we have our test class available for execution in two contexts.
现在,我们可以使测试类在以下两个上下文中执行测试。
Therefore we can use a base test class for all Wicket-related unit tests.
因此,我们可以为所有Wicket相关的单元测试创建一个测试基类。
Introspects your test class and executes each method starting with "test".
内省测试类,并执行每个以“test”开头的方法。
The first option is to move this test class into the integration directory.
第一个选择是将此测试类转移到集成目录中。
Each time you save the source file, you invoke a parsing of the test class.
你每次保存这些源文件时,便调用测试类的解析。
Click through to the failing test class. The results are shown in Figure 2.
单击失败的测试类。
Once you have your test class, the real action happens in your test methods.
一旦创建好测试类之后,测试方法中要有实际的动作。
To execute the test class, go to the J2EE perspective, Project Explorer view.
要执行测试类,请转到J2EE透视图中的ProjectExplorer视图。
Observe in the Test pane that the project and test class values are filled in.
检查测试窗格,将看到项目和测试类值已填充。
Within each test class, individual unit tests are stored as test methods.
在每个测试类中,单个单元测试存储为测试方法。
Once you have an abstract aspect, create a mock target inside your test class.
有了抽象方面后,在测试类中创建一个mock目标。
You just write a test class (TC_Person in this example) that subclasses TestCase.
您只是写了一个测试类(在该示例是tC _ Person),它是TestCase的子类。
This project does not contain a database unit test class, which you must add.
此项目中不包括数据库单元测试类,您必须自己添加该测试类。
I can build class stock, and I can test class stock, before I have a class market.
我可以建立一个stock类,然后在有macket类之前测试这个类。
For each test case. basically you need to extend your test class from TestCase.
对于每个案例来说,您都需要从TestCase扩展您的测试类。
5 Even after I import the junit.framework. Assert class, my test class will not compile.
5甚至在将junit . framework .assert类导入之后,测试类还是不能编译。
应用推荐