Author: jjamrich
Date: 2011-09-23 09:25:20 -0400 (Fri, 23 Sep 2011)
New Revision: 22741
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragIndicator/DragIndicatorAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragIndicator/TestDragIndicator.java
Log:
RFPL-1439: Update dragIndicatorAttributes to use unified way to setting attributes
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java 2011-09-23
13:24:56 UTC (rev 22740)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java 2011-09-23
13:25:20 UTC (rev 22741)
@@ -16,6 +16,7 @@
import org.richfaces.tests.metamer.ftest.richColumn.ColumnAttributes;
import
org.richfaces.tests.metamer.ftest.richComponentControl.ComponentControlAttributes;
import org.richfaces.tests.metamer.ftest.richDataScroller.DataScrollerAttributes;
+import org.richfaces.tests.metamer.ftest.richDragIndicator.DragIndicatorAttributes;
import org.richfaces.tests.metamer.ftest.richTooltip.TooltipAttributes;
public class AttributeList {
@@ -36,5 +37,6 @@
public static Attributes<ColumnAttributes> columnAttributes = new
Attributes<ColumnAttributes>();
public static Attributes<ComponentControlAttributes>
componentControllAttributes = new Attributes<ComponentControlAttributes>();
public static Attributes<DataScrollerAttributes> dataScrollerAttributes = new
Attributes<DataScrollerAttributes>();
+ public static Attributes<DragIndicatorAttributes> dragIndicatorAttributes = new
Attributes<DragIndicatorAttributes>();
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragIndicator/DragIndicatorAttributes.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragIndicator/DragIndicatorAttributes.java 2011-09-23
13:24:56 UTC (rev 22740)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragIndicator/DragIndicatorAttributes.java 2011-09-23
13:25:20 UTC (rev 22741)
@@ -21,26 +21,17 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.richDragIndicator;
-import org.richfaces.tests.metamer.ftest.AbstractComponentAttributes;
+import org.richfaces.tests.metamer.ftest.attributes.AttributeEnum;
/**
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
-public class DragIndicatorAttributes extends AbstractComponentAttributes {
- public void setAcceptClass(String acceptClass) {
- setProperty("acceptClass", acceptClass);
- }
-
- public void setDraggingClass(String draggingClass) {
- setProperty("draggingClass", draggingClass);
- }
-
- public void setRejectClass(String rejectClass) {
- setProperty("rejectClass", rejectClass);
- }
-
- public void setRendered(Boolean rendered) {
- setProperty("rendered", rendered);
- }
+public enum DragIndicatorAttributes implements AttributeEnum {
+
+ acceptClass,
+ draggingClass,
+ rejectClass,
+ rendered
+
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragIndicator/TestDragIndicator.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragIndicator/TestDragIndicator.java 2011-09-23
13:24:56 UTC (rev 22740)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragIndicator/TestDragIndicator.java 2011-09-23
13:25:20 UTC (rev 22741)
@@ -24,6 +24,8 @@
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
+import static
org.richfaces.tests.metamer.ftest.attributes.AttributeList.dragIndicatorAttributes;
+import static
org.richfaces.tests.metamer.ftest.richDragIndicator.DragIndicatorAttributes.*;
import java.net.URL;
@@ -43,8 +45,6 @@
private static final String REJECT_CLASS = "sample-reject-class";
private static final String DRAGGING_CLASS = "sample-dragging-class";
- private DragIndicatorAttributes attributes = new DragIndicatorAttributes();
-
@Override
public URL getTestUrl() {
return buildUrl(contextPath,
"faces/components/richDragIndicator/simple.xhtml");
@@ -52,9 +52,9 @@
@BeforeMethod
public void setup() {
- attributes.setDraggingClass(DRAGGING_CLASS);
- attributes.setAcceptClass(ACCEPT_CLASS);
- attributes.setRejectClass(REJECT_CLASS);
+ dragIndicatorAttributes.set(draggingClass, DRAGGING_CLASS);
+ dragIndicatorAttributes.set(acceptClass, ACCEPT_CLASS);
+ dragIndicatorAttributes.set(rejectClass, REJECT_CLASS);
indicator.setDraggingClass(DRAGGING_CLASS);
indicator.setAcceptClass(ACCEPT_CLASS);
indicator.setRejectClass(REJECT_CLASS);
@@ -62,7 +62,7 @@
@Test
public void testRendered() {
- attributes.setRendered(false);
+ dragIndicatorAttributes.set(rendered, false);
selenium.getPageExtensions().install();
selenium.getRequestInterceptor().clearRequestTypeDone();
Show replies by date