summaryrefslogtreecommitdiff
path: root/testng7_port.patch
blob: 16e43e9a05921fb66732ee18ec907eaacee666f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/byteman-4.0.15/contrib/bmunit/src/org/jboss/byteman/contrib/bmunit/BMNGListener.java b/byteman-4.0.15/contrib/bmunit/src/org/jboss/byteman/contrib/bmunit/BMNGListener.java
index 2f784bc..9e4fec9 100644
--- a/byteman-4.0.15/contrib/bmunit/src/org/jboss/byteman/contrib/bmunit/BMNGListener.java
+++ b/byteman-4.0.15/contrib/bmunit/src/org/jboss/byteman/contrib/bmunit/BMNGListener.java
@@ -61,7 +61,7 @@ public class BMNGListener extends BMNGAbstractRunner implements IInvokedMethodLi
     }
 
     public void beforeInvocation(IInvokedMethod method, ITestResult testResult) {
-        Method javaMethod = method.getTestMethod().getMethod();
+        Method javaMethod = method.getTestMethod().getConstructorOrMethod().getMethod();
         Class clazz = javaMethod.getDeclaringClass();
         if (!checkBMNGListener(clazz)) {
             return;
@@ -81,7 +81,7 @@ public class BMNGListener extends BMNGAbstractRunner implements IInvokedMethodLi
     }
 
     public void afterInvocation(IInvokedMethod method, ITestResult testResult) {
-        Method javaMethod = method.getTestMethod().getMethod();
+        Method javaMethod = method.getTestMethod().getConstructorOrMethod().getMethod();
         Class clazz = javaMethod.getDeclaringClass();
         if (!checkBMNGListener(clazz)) {
             return;