From 536aafb2891ad547627ec29625fc3aad4a190e12 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 26 Jun 2011 06:45:05 +0200 Subject: Cleanup UITestCase helper, expose test class name via get*TestName() .. --- .../com/jogamp/opengl/test/junit/util/UITestCase.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java b/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java index a25835596..9856616d1 100644 --- a/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java +++ b/src/test/com/jogamp/opengl/test/junit/util/UITestCase.java @@ -59,6 +59,18 @@ public abstract class UITestCase { } } + public final String getTestMethodName() { + return _unitTestName.getMethodName(); + } + + public final String getSimpleTestName() { + return getClass().getSimpleName()+" - "+getTestMethodName(); + } + + public final String getFullTestName() { + return getClass().getName()+" - "+getTestMethodName(); + } + @BeforeClass public static void oneTimeSetUp() { // one-time initialization code @@ -74,12 +86,12 @@ public abstract class UITestCase { @Before public void setUp() { initSingletonInstance(); - System.err.println("++++ UITestCase.setUp: "+getClass().getName()+" - "+_unitTestName.getMethodName()); + System.err.println("++++ UITestCase.setUp: "+getFullTestName()); } @After public void tearDown() { - System.err.println("++++ UITestCase.tearDown: "+getClass().getName()+" - "+_unitTestName.getMethodName()); + System.err.println("++++ UITestCase.tearDown: "+getFullTestName()); } } -- cgit v1.2.3