Write the unit test before writing code for class it tests.
首先编写单元测试,然后再编写要测试的类代码。
Writing a unit test for a Stack class is straightforward.
可以很直观地写出对堆栈类的单元测试。
If a unit test crosses class boundaries, it might be a functional test.
如果单元测试跨越类边界,则它就可能是功能测试。
Now imagine trying to unit test a class that makes an expensive SOAP call.
现在,想像一下对发出开销较高的SOAP调用的类进行单元测试。
Therefore we can use a base test class for all Wicket-related unit tests.
因此,我们可以为所有Wicket相关的单元测试创建一个测试基类。
In general, there should be a unit test for every public method of your class.
一般而言,类的每个公共方法都应有一个单元测试。
How to unit test a timer class (adapter pattern)?
如何单元测试一个计时器类(适配器模式)?
Within each test class, individual unit tests are stored as test methods.
在每个测试类中,单个单元测试存储为测试方法。
This project does not contain a database unit test class, which you must add.
此项目中不包括数据库单元测试类,您必须自己添加该测试类。
Create a new database unit test inside a new test class.
在新的测试类别内建立新的资料库单元测试。
Create a new database unit test inside an existing test class.
在现有的测试类别内建立新的资料库单元测试。
Create a new database unit test inside an existing test class.
在现有的测试类别内建立新的资料库单元测试。
应用推荐