From 3bdab59e871c76baffeaeec228c865cbb4241a97 Mon Sep 17 00:00:00 2001
From: kaloyane <kaloyane>
Date: Wed, 13 Apr 2011 11:49:53 +0000
Subject: [PATCH] minor: hudson complains about TestNG parameters, but
 everything works well in Eclipse ?

SVN: 20877
---
 .../openbis/generic/server/business/bo/AbstractBOTest.java  | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractBOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractBOTest.java
index e68224439a5..67a5f78784a 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractBOTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractBOTest.java
@@ -16,8 +16,6 @@
 
 package ch.systemsx.cisd.openbis.generic.server.business.bo;
 
-import java.lang.reflect.Method;
-
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.testng.AssertJUnit;
@@ -196,7 +194,7 @@ public abstract class AbstractBOTest extends AssertJUnit
     }
 
     @AfterMethod
-    public void afterMethod(ITestResult result, Method m)
+    public void afterMethod(ITestResult result)
     {
         // verify mock expectations only when the test has not failed
         if (result.isSuccess())
@@ -207,7 +205,7 @@ public abstract class AbstractBOTest extends AssertJUnit
             } catch (Throwable t)
             {
                 // assert expectations were met, including the name of the failed method
-                throw new Error(m.getName() + "() : ", t);
+                throw new Error(result.getMethod().getMethodName() + "() : ", t);
             }
         }
     }
-- 
GitLab