summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Kriese2010-10-06 02:39:23 (EDT)
committerSteffen Kriese2010-10-06 02:39:23 (EDT)
commit96adda6b6fa6ff4a6453b9668028cf905d5a8545 (patch)
tree254eab59ac898ee3651b91372925c008e44ee4c0
parent7ab270050e261e456d3234d58ca1b52e38e3dbf7 (diff)
downloadorg.eclipse.riena-96adda6b6fa6ff4a6453b9668028cf905d5a8545.zip
org.eclipse.riena-96adda6b6fa6ff4a6453b9668028cf905d5a8545.tar.gz
org.eclipse.riena-96adda6b6fa6ff4a6453b9668028cf905d5a8545.tar.bz2
fixed MarkerSupportTest
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/ui/ridgets/swt/MarkerSupportTest.java22
1 files changed, 19 insertions, 3 deletions
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/ui/ridgets/swt/MarkerSupportTest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/ui/ridgets/swt/MarkerSupportTest.java
index e9dfeec..1979ff8 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/ui/ridgets/swt/MarkerSupportTest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/ui/ridgets/swt/MarkerSupportTest.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.riena.ui.ridgets.swt;
+import java.beans.PropertyChangeSupport;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -150,12 +151,22 @@ public class MarkerSupportTest extends RienaTestCase {
final Color background = control.getBackground();
final Color foreground = control.getForeground();
- final ITextRidget ridget = new TextRidget();
- ridget.setUIControl(control);
final MyMarkerSupport markerSupport = new MyMarkerSupport();
- markerSupport.init(ridget, null);
+
+ // the LNF creates a MarkerSupport for every Ridget, so we have to provide our custom MarkerSupport at this point
+ final ITextRidget ridget = new TextRidget() {
+ @Override
+ protected org.eclipse.riena.ui.ridgets.AbstractMarkerSupport createMarkerSupport() {
+ return markerSupport;
+ }
+ };
+ ridget.setUIControl(control);
+ markerSupport.init(ridget, new PropertyChangeSupport(new Object()));
+
+ assertTrue(background.equals(control.getBackground()));
ridget.addMarker(new MandatoryMarker());
+
markerSupport.updateMarkers();
assertFalse(background.equals(control.getBackground()));
@@ -260,6 +271,11 @@ public class MarkerSupportTest extends RienaTestCase {
super.clearAllMarkers(control);
}
+ @Override
+ public void clearMandatory(final Control control) {
+ super.clearMandatory(control);
+ }
+
}
}