summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Liebig2008-03-11 10:34:02 (EDT)
committerStefan Liebig2008-03-11 10:34:02 (EDT)
commit07626f67e528e2621d25a54d2586514d4b9a3439 (patch)
tree288cc1336f57029a10b476994d44919dbe32c965
parent33b16ab44efae338e91f1f6c220189244d57b05e (diff)
downloadorg.eclipse.riena-07626f67e528e2621d25a54d2586514d4b9a3439.zip
org.eclipse.riena-07626f67e528e2621d25a54d2586514d4b9a3439.tar.gz
org.eclipse.riena-07626f67e528e2621d25a54d2586514d4b9a3439.tar.bz2
added printTestName()
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/core/service/InjectorTest.java23
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/tests/RienaTestCase.java10
2 files changed, 21 insertions, 12 deletions
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/core/service/InjectorTest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/core/service/InjectorTest.java
index 322651b..e28a539 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/core/service/InjectorTest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/core/service/InjectorTest.java
@@ -13,9 +13,8 @@ package org.eclipse.riena.core.service;
import java.util.Dictionary;
import java.util.Hashtable;
-import junit.framework.TestCase;
-
import org.eclipse.riena.internal.tests.Activator;
+import org.eclipse.riena.tests.RienaTestCase;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
import org.osgi.framework.ServiceRegistration;
@@ -23,7 +22,7 @@ import org.osgi.framework.ServiceRegistration;
/**
*
*/
-public class InjectorTest extends TestCase {
+public class InjectorTest extends RienaTestCase {
private BundleContext context;
@@ -48,7 +47,7 @@ public class InjectorTest extends TestCase {
}
public void testInjectDepOneObviousBindUnbindError() {
- System.out.println("testInjectDepOneObviousBindUnbindError:");
+ printTestName();
Target target = new Target();
DepOne depOne = new DepOne();
@@ -65,7 +64,7 @@ public class InjectorTest extends TestCase {
}
public void testInjectDepOneNotSoObviousBindUnbindError() {
- System.out.println("testInjectDepOneNotSoObviousBindUnbindError:");
+ printTestName();
Target target = new Target();
DepTwo depTwo = new DepTwo();
@@ -81,7 +80,7 @@ public class InjectorTest extends TestCase {
}
public void testInjectDepOneDefaultBindUnbind() {
- System.out.println("testInjectDepOneDefaultBindUnbind:");
+ printTestName();
Target target = new Target();
DepOne depOne = new DepOne();
@@ -97,7 +96,7 @@ public class InjectorTest extends TestCase {
}
public void testInjectDepOneAndDepTwoDefaultBindUnbind() {
- System.out.println("testInjectDepOneAndDepTwoDefaultBindUnbind:");
+ printTestName();
Target target = new Target();
DepOne depOne = new DepOne();
@@ -124,7 +123,7 @@ public class InjectorTest extends TestCase {
}
public void testInjectDepOneBindeEntbinde() {
- System.out.println("testInjectDepOneBindeEntbinde:");
+ printTestName();
Target target = new Target();
DepOne depOne = new DepOne();
@@ -141,7 +140,7 @@ public class InjectorTest extends TestCase {
}
public void testInjectRankedServicesServicesRegisteredBefore() {
- System.out.println("testInjectRankedServicesServicesRegisteredBefore:");
+ printTestName();
Target target = new Target();
IRanking rank1 = new RankingOne(0);
@@ -165,7 +164,7 @@ public class InjectorTest extends TestCase {
}
public void testInjectRankedServicesServicesRegisteredOnTheRun() {
- System.out.println("testInjectRankedServicesServicesRegisteredOnTheRun:");
+ printTestName();
Target target = new Target();
IRanking rank1 = new RankingOne(0);
@@ -204,7 +203,7 @@ public class InjectorTest extends TestCase {
}
public void testInjectMostSpecifBindMethod() {
- System.out.println("testInjectMostSpecifBindMethod:");
+ printTestName();
Target target = new Target();
DepOne depOne = new DepOneOne();
@@ -221,7 +220,7 @@ public class InjectorTest extends TestCase {
}
public void testFilterTest() {
- System.out.println("testFilterTest:");
+ printTestName();
Target target = new Target();
DepOne depOne = new DepOneOne();
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/tests/RienaTestCase.java b/org.eclipse.riena.tests/src/org/eclipse/riena/tests/RienaTestCase.java
index d3ce292..6ca4022 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/tests/RienaTestCase.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/tests/RienaTestCase.java
@@ -80,6 +80,16 @@ public abstract class RienaTestCase extends TestCase {
}
/**
+ * Print the current test´s name.
+ */
+ protected void printTestName() {
+ System.out.println(getName());
+ for (int i = 0; i < getName().length(); i++)
+ System.out.print('-');
+ System.out.println();
+ }
+
+ /**
* Add an extension/extension point defined within the ´plugin.xml´ given
* with the <code>pluginResource</code> to the extension registry.
*