Permalink
Browse files

BYTEMAN-148, update the config usage and junit/ng tests

  • Loading branch information...
1 parent 8c6890e commit 3a387b43c1e5ca9d81258f5f72d3f8b6b2e1ed59 Scott Stark committed Feb 2, 2011
@@ -18,6 +18,7 @@
*/
package org.jboss.byteman.contrib.bmunit;
+import org.junit.runners.model.InitializationError;
import org.testng.IHookCallBack;
import org.testng.IHookable;
import org.testng.ITestResult;
@@ -68,8 +69,14 @@ public void bmngBeforeClass() throws Exception
testKlazz = getClass();
classUnitConfig = testKlazz.getAnnotation(BMUnitConfig.class);
if (classUnitConfig == null) {
- // Pickup the defaults from this class
- classUnitConfig = getClass().getAnnotation(BMUnitConfig.class);
+ // Pickup the defaults from this class
+ classUnitConfig = getClass().getAnnotation(BMUnitConfig.class);
+ }
+ // Load the agent
+ try {
+ BMUnit.loadAgent(classUnitConfig);
+ } catch (Exception e) {
+ throw new InitializationError(e);
}
classSingleScriptAnnotation = testKlazz.getAnnotation(BMScript.class);
classMultiScriptAnnotation = testKlazz.getAnnotation(BMScripts.class);
Oops, something went wrong.

0 comments on commit 3a387b4

Please sign in to comment.