Author: julien_viet
Date: 2009-09-13 13:34:26 -0400 (Sun, 13 Sep 2009)
New Revision: 182
Modified:
components/mop/trunk/core/src/test/java/org/gatein/mop/core/api/workspace/content/CustomizationTestCase.java
Log:
more virtual state
Modified:
components/mop/trunk/core/src/test/java/org/gatein/mop/core/api/workspace/content/CustomizationTestCase.java
===================================================================
---
components/mop/trunk/core/src/test/java/org/gatein/mop/core/api/workspace/content/CustomizationTestCase.java 2009-09-13
12:21:54 UTC (rev 181)
+++
components/mop/trunk/core/src/test/java/org/gatein/mop/core/api/workspace/content/CustomizationTestCase.java 2009-09-13
17:34:26 UTC (rev 182)
@@ -50,14 +50,25 @@
/** . */
private final Preferences parisFarenheit = new
PreferencesBuilder().add("city", "paris").add("temperature",
"farenheit").build();
- public void testCustomizationBlending() {
+ public void testVirtualCustomization() {
Workspace workspace = pomService.getModel().getWorkspace();
Customization<Preferences> customization1 =
workspace.customize("marseille", Preferences.CONTENT_TYPE,
"WeatherPortlet", marseille);
Customization<Preferences> customization2 =
workspace.customize("paris", customization1);
+
+ //
customization2.setState(paris);
assertEquals(paris, customization2.getState());
assertEquals(parisCelsius, customization2.getVirtualState());
-//
customization1.setState(customization1.getState().setReadOnly("temperature",
true));
+
+ //
+ customization2.setState(parisFarenheit);
+ assertEquals(parisFarenheit, customization2.getState());
+ assertEquals(parisFarenheit, customization2.getVirtualState());
+
+ //
+
customization1.setState(customization1.getState().setReadOnly("temperature",
true));
+ assertEquals(parisFarenheit, customization2.getState());
+ assertEquals(parisCelsius, customization2.getVirtualState());
}
public void testCustomizeWorkspace() {
Show replies by date