Author: jjamrich
Date: 2011-09-23 09:25:44 -0400 (Fri, 23 Sep 2011)
New Revision: 22742
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/richDragSource/DragSourceAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragSource/TestDragSource.java
Log:
RFPL-1439: Updated DragSourceAttributes 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:25:20 UTC (rev 22741)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java 2011-09-23
13:25:44 UTC (rev 22742)
@@ -17,6 +17,7 @@
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.richDragSource.DragSourceAttributes;
import org.richfaces.tests.metamer.ftest.richTooltip.TooltipAttributes;
public class AttributeList {
@@ -38,5 +39,6 @@
public static Attributes<ComponentControlAttributes>
componentControllAttributes = new Attributes<ComponentControlAttributes>();
public static Attributes<DataScrollerAttributes> dataScrollerAttributes = new
Attributes<DataScrollerAttributes>();
public static Attributes<DragIndicatorAttributes> dragIndicatorAttributes = new
Attributes<DragIndicatorAttributes>();
+ public static Attributes<DragSourceAttributes> dragSourceAttributes = new
Attributes<DragSourceAttributes>();
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragSource/DragSourceAttributes.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragSource/DragSourceAttributes.java 2011-09-23
13:25:20 UTC (rev 22741)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragSource/DragSourceAttributes.java 2011-09-23
13:25:44 UTC (rev 22742)
@@ -21,22 +21,16 @@
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.richDragSource;
-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 DragSourceAttributes extends AbstractComponentAttributes {
- public void setDragIndicator(String dragIndicator) {
- setProperty("dragIndicator", dragIndicator);
- }
-
- public void setType(String type) {
- setProperty("type", type);
- }
-
- public void setRendered(Boolean rendered) {
- setProperty("rendered", rendered);
- }
+public enum DragSourceAttributes implements AttributeEnum {
+
+ dragIndicator,
+ type,
+ rendered
+
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragSource/TestDragSource.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragSource/TestDragSource.java 2011-09-23
13:25:20 UTC (rev 22741)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDragSource/TestDragSource.java 2011-09-23
13:25:44 UTC (rev 22742)
@@ -25,6 +25,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.dragSourceAttributes;
+import static org.richfaces.tests.metamer.ftest.richDragSource.DragSourceAttributes.*;
import java.net.URL;
@@ -41,8 +43,6 @@
*/
public class TestDragSource extends AbstractDragNDropTest {
- DragSourceAttributes attributes = new DragSourceAttributes();
-
@Override
public URL getTestUrl() {
return buildUrl(contextPath,
"faces/components/richDragSource/simple.xhtml");
@@ -52,7 +52,7 @@
public void testDefaultIndicator() {
indicator = new Indicator("defaultIndicator",
drg1.getNthOccurence(2));
indicator.setDefaultIndicator(true);
- attributes.setDragIndicator("");
+ dragSourceAttributes.set(dragIndicator, "");
drag = new Drag(drg1, drop1);
drag.setDragIndicator(indicator);
@@ -63,7 +63,7 @@
@Test
public void testCustomIndicator() {
indicator = new Indicator("ind",
jq("div.rf-ind[id$=indicator2]"));
- attributes.setDragIndicator("indicator2");
+ dragSourceAttributes.set(dragIndicator, "indicator2");
drag = new Drag(drg1, drop1);
drag.setDragIndicator(indicator);
@@ -73,7 +73,7 @@
@Test
public void testRendered() {
- attributes.setRendered(false);
+ dragSourceAttributes.set(rendered, false);
selenium.getPageExtensions().install();
selenium.getRequestInterceptor().clearRequestTypeDone();
@@ -92,7 +92,7 @@
@Test
public void testType() {
- attributes.setType("drg3");
+ dragSourceAttributes.set(type, "drg3");
drag = new Drag(drg1, drop2);
drag.setDragIndicator(indicator);
enterAndVerify(drop2, IndicatorState.ACCEPTING);
Show replies by date