-
Notifications
You must be signed in to change notification settings - Fork 1k
/
JUnitTestMethod.java
43 lines (37 loc) · 1.13 KB
/
JUnitTestMethod.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package org.testng.junit;
import org.testng.ITestNGMethod;
import org.testng.ITestObjectFactory;
import org.testng.internal.BaseTestMethod;
import org.testng.internal.ConstructorOrMethod;
// NO JUnit specific code here to avoid runtime errors
/**
* @deprecated - Support for running JUnit tests stands deprecated as of TestNG <code>7.6.2</code>
*/
@Deprecated
public abstract class JUnitTestMethod extends BaseTestMethod {
protected JUnitTestMethod(
ITestObjectFactory objectFactory,
JUnitTestClass owner,
ConstructorOrMethod method,
Object instance) {
this(objectFactory, owner, method.getName(), method, instance);
}
protected JUnitTestMethod(
ITestObjectFactory objectFactory,
JUnitTestClass owner,
String methodName,
ConstructorOrMethod method,
Object instance) {
super(objectFactory, methodName, method, null, instance);
setTestClass(owner);
owner.getTestMethodList().add(this);
}
@Override
public boolean isTest() {
return true;
}
@Override
public ITestNGMethod clone() {
throw new IllegalStateException("clone is not supported for JUnit");
}
}