createTestMethodInstance
类: matlab.unittest.plugins.TestRunnerPlugin
命名空间: matlab.unittest.plugins
扩展方法级别 TestCase 实例的创建
说明
tc = createTestMethodInstance( 扩展方法级别 plugin,pluginData)TestCase 实例的创建,并返回修改后的 TestCase 实例。测试框架在 runTest 方法的作用域内计算此方法。
此方法的典型实现是将侦听程序添加到源自方法级别实例的各种事件。因为 TestCase 类继承自 handle 类,所以通过从 createTestMethodInstance 方法内调用 addlistener 方法来添加侦听程序。测试框架为 matlab.unittest.Test 数组的每个元素创建实例并将每个实例传递到其相应的 Test 方法及任何带有 TestMethodSetup 或 TestMethodTeardown 属性的方法。
输入参数
示例
版本历史记录
在 R2014a 中推出