The following test method is used.
然后使用下面这个测试方法。
Our test method, then, looks like this
因而,我们的测试方法类似于
Example of calling a unit test method.
调用单元测试方法的实例。
Each test method has its own unique TDT.
每个测试方法都有其惟一的TDT。
Executes the setUp method before each test method.
在执行每个测试方法之前执行setUp方法。
The test method for this example looks like Listing 4.
此示例的测试方法类似于清单4。
Test success is indicated by completion of a test method.
测试成功通过测试方法的完成来指示。
Third, the original expectation of the test method has not changed.
第三,测试方法的原始期望并未更改。
matrix method will create a test method for every applicable result
ZenTest通过Setup方法保存案例,matrix方法为每一个应用结果创建一个测试方法
To turn it on, call EasyMock.verify (mock) at the end of your test method.
要想启用它,应该在测试方法末尾调用EasyMock . verify (mock)。
For the first test method, you can use the information directly from the WSDL.
对于第一种测试方法,可以直接使用WSDL中的信息。
For each generated test method, a corresponding Complete method is also generated.
对于每一个生成的测试方法,都会有一个对应的Complete方法。
For example, there is a test method like the following with some simple assertions.
举例来说,下面有一个测试方法,其中有一些简单的断言。
In this example, for clarity, we left some of the validation inside the test method.
在本示例中,为了清晰起见,我们将验证的某些部分放在了测试方法内部。
If the test method happens to take longer than 1000 milliseconds to execute, it fails.
如果执行该测试方法所花的时间多于1000毫秒,则测试失败。
You should see one dot for each test method, and OK (1 test) at the end of the test run.
每个测试方法应该都有一个点,并且在运行完成后会显示OK (1test)。
That's why the main test method in Listing 1 USES a while loop instead of a new for loop.
这就是为什么清单1中的main测试方法使用while循环而不是一个新的for循环。
AfterTestMethod methods are executed after the execution of every test method in a class.
afterTestMethod方法在类中的每个测试方法执行之后执行。
BeforeTestMethod methods are executed before the execution of any test method in a class.
beforeTestMethod方法在类中的任何测试方法执行之前执行。
With the mechanics out of the way, note that I made a few design decisions in my test method.
有了这些原理之后,要注意,我在测试方法中制订了一些设计决策。
Your test class now has a protected field called account, and the test method initializes it.
现在您的测试类有一个叫做account的受保护的字段,测试方法对其进行了初始化。
Within the test method itself, testRunServiceAndReturnFalse(), you can see a few more changes.
在测试方法本身testRunServiceAndReturnFalse() 之内,您可以看到更多更改。
The JUnit 3.8 naming convention states that all test method names should begin with word test.
JUnit 3.8命名约定规定所有测试方法名称应以单词 test开头。
The JUnit naming convention states that all test method names should begin with the word "test."
JUnit命名约定规定所有测试方法名称都应以单词“test”开头。
So, instead of letting the tool create the initial test method, I will write each method as I go.
因此,我将自己书写每一个用到的方法,不让工具生成原始的测试方法。
Finally, add some code in your main test method to print out and execute the generated SQL query.
最后,在main测试方法中添加一些代码,用以输出和执行所生成的SQL查询。
You may have several.tspec files for each test method; they will be executed in alphabetic order.
每个测试方法可以具有多个. tspec文件;它们将按字母顺序执行。
This is true for mock objects defined in a common setUp() method or within the actual test method.
这对于在公共的setUp()方法中或在实际测试方法内定义的模拟对象来说是正确的。
I need to decide if I will have just one test method or many test methods for the different test cases.
我需要决定对不同的测试用例是使用一个测试方法还是多个测试方法。
Within that directory, we have one directory per test method, whose name exactly matches the method name.
在该目录中,我们对每个测试方法都提供了一个目录,其名称完全匹配该方法名称。
应用推荐