Listing 6 a test class for a special Facebook user.
清单6一个特殊的Facebook用户的测试类。
Listing 12 a test class for a polymorphic Facebook user record.
清单12一条多态Facebook用户记录的测试类。
Listing 4 shows the test class, again showing the main sections of the test.
清单4显示了测试类,还显示了测试的主要部分。
Listing 16: Base test class for Wicket unit tests of Warsaw and Global projects.
清单16:warsaw和Global项目的Wicket单元测试基类。
A simple test class for the polymorphic special Facebook user is presented below.
下面给出一个多态Facebook特殊用户的简单测试类。
The test class contains test fixtures, which are initialized in a setUp function.
测试类中包含测试装置(fixture),它们在setUp函数中初始化。
The fixture class is derived from the: : testing: : test class declared in gtest.h.
这个装备类派生自gtest . h中声明的:testing:test类。
The above listing is a test class which performs basic tests on the feedparser module.
上述清单是实现feedparser模块基本测试功能的测试类。
For instance, what will happen if I run the CreateWidgetUATest test class twice in a row?
比如,如果对一行运行两次CreateWidgetUATest测试类会怎样?
Now that I have my test class defined I can start developing (and testing) the application.
定义了测试类后,就可以开始开发(并测试)这个应用程序了。
The ScaTestExecutor constructor takes the test class and the name of the test as parameters.
ScaTestExecutor构造函数将测试类和测试的名称作为参数。
Type grails test-app -unit User to target the specific test class you are interested in.
键入grailstest - app -unit User定位到您感兴趣的特定测试类。
Your test class now has a protected field called account, and the test method initializes it.
现在您的测试类有一个叫做account的受保护的字段,测试方法对其进行了初始化。
When nose looks inside of a test class, it runs methods matching that same regular expression.
当nose 检查测试类的内部时,它运行与同一正则表达式匹配的方法。
With the first way, you pass the test class to the TestSuite constructor by using this command.
对于第一种方法,您可以通过使用这个命令将测试用例传递到TestSuite构造器。
To run this unit test, create a run configuration for the unit test class as a test: : unit type.
要运行这个单元测试,应该为单元测试类创建一个Test:Unit类型的Run配置。
Back inside the test class, we define the MockTransaction class as a member class, as shown in Listing 5.
后退到测试类内部,我们将mocktransaction类定义为成员类,如清单5中所示。
A new JUnit target will be created, and DynamicTestSuite should be pre-filled in the Test Class field.
将会创建一个新的JUnit目标,DynamicTestSuite应当预填入test class字段。
The typical JUnit programming model creates a test class by extending the TestCase class provided by JUnit.
典型的JUnit编程模型通过扩展JUnit提供的testcase类创建测试类。
The execution model is a bit strange: The test class is reinstantiated every time a test method is executed.
执行模型有点奇怪:每次执行一个测试方法的时候,都要重新实例化测试类。
Let's examine the test class HumanTaskExampleTest and the data files in the HumanTaskExample-Data directory.
让我们检查一下测试类HumanTaskExampleTest和HumanTaskExample - Data目录中的数据文件。
JsfTestCase: This is the base test class for unit tests for Servlet and JSF components in a web application.
AbstractJsfTestCase:这是对web应用的Servlet和JSF组件进行单元测试的基础测试类。
We will first create a JUnit test class, add a single test to the class, and then, finally, execute the test.
我们首先创建JUnit测试类,将单个测试添加到该类,最后执行该测试。
So make sure you have factory-creation code in your test class, and you're ready to work with the XPath class.
因此测试类中一定要包含工厂创建代码,以便能够使用XPath 类。
The test class contains two tests: one to authenticate a valid user and another to authenticate an invalid user.
这个测试类包含两个测试:一个是鉴定一个无效用户,另一个是鉴定一个有效的用户。
In Listing 3 I've created the class shell that will serve as my test class as I write the dictionary application.
在清单3中,我创建了类shell,它作为在编写字典应用程序时的测试类。
There is one directory per test class, whose name is derived from the test class name by appending the suffix -data.
每个测试类都有一个目录,其名称源自测试类的名称,并附加前缀- Data。
Finally, the two lines at the bottom allow you to run the tests within this test class by simply running this module.
最后的两行负责在这个测试类内部运行测试,方法是直接运行该模块即可。
Add a method to TestCase that will test the deposit method on Account. The test class should now look like Listing 1.
向TestCase添加一种方法将测试Account的deposit方法。
Add a method to TestCase that will test the deposit method on Account. The test class should now look like Listing 1.
向TestCase添加一种方法将测试Account的deposit方法。
应用推荐