Author: mvitenkov
Date: 2009-05-27 12:37:53 -0400 (Wed, 27 May 2009)
New Revision: 14380
Modified:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf5758/Test.java
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf5772/Test.java
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf5835/Test.java
Log:
test correction according to convention rules.
Modified:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf5758/Test.java
===================================================================
---
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf5758/Test.java 2009-05-27
16:31:51 UTC (rev 14379)
+++
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf5758/Test.java 2009-05-27
16:37:53 UTC (rev 14380)
@@ -1,16 +1,14 @@
package org.richfaces.testng.rf5758;
import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
public class Test extends SeleniumTestBase {
@org.testng.annotations.Test
public void testExecute() throws Exception{
- renderPage();
- String str;
- if((str = selenium.getValue("//form/span/input")).compareTo("Item
45") != 0){
- throw new AssertionError("Expected: <Item 45>; Actual: <" + str +
">");
- }
+ renderPage();
+ Assert.assertEquals(selenium.getValue("//form/span/input"),"Item
45");
}
@Override
Modified:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf5772/Test.java
===================================================================
---
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf5772/Test.java 2009-05-27
16:31:51 UTC (rev 14379)
+++
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf5772/Test.java 2009-05-27
16:37:53 UTC (rev 14380)
@@ -1,6 +1,7 @@
package org.richfaces.testng.rf5772;
import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
public class Test extends SeleniumTestBase {
@@ -14,10 +15,7 @@
selenium.doubleClick("form:listShuttleID:0");
Number l2 = selenium.getElementPositionLeft("form:listShuttleID:0");
- if(l1.intValue()==l2.intValue()){
- throw new AssertionError("item didn't move to target");
- }
-
+ Assert.assertNotSame(l2, l1);
}
@Override
Modified:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf5835/Test.java
===================================================================
---
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf5835/Test.java 2009-05-27
16:31:51 UTC (rev 14379)
+++
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf5835/Test.java 2009-05-27
16:37:53 UTC (rev 14380)
@@ -1,6 +1,7 @@
package org.richfaces.testng.rf5835;
import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
public class Test extends SeleniumTestBase {
@@ -11,18 +12,17 @@
clickAjaxCommandAndWait("form:tree:10::_defaultNodeFace:handle");
//check if line is present in expanded childs
- Number childs = getHeightById("form:tree:10::_defaultNodeFace:childs");
- Number child =
selenium.getElementHeight("//div[@id='form:tree:10::_defaultNodeFace:childs']/table[1]");
- int dif = 0;
+ Number actual = getHeightById("form:tree:10::_defaultNodeFace:childs");
+ Number expected =
selenium.getElementHeight("//div[@id='form:tree:10::_defaultNodeFace:childs']/table[1]");
- if(!((dif=(10*child.intValue() - childs.intValue())) == 0)){
- throw new AssertionError("white line is after the last child:" + dif);
- }
+ Assert.assertEquals(actual.intValue(), 10*expected.intValue());
+
//check if line is present after expanded childs
- if((dif = getHeightById("form:tree").intValue() -
getHeightById("form:tree:childs").intValue()) != 0){
- throw new AssertionError("white line is after all childs:" + dif);
- }
+ actual = getHeightById("form:tree");
+ expected = getHeightById("form:tree:childs");
+ Assert.assertEquals(actual.intValue(), expected.intValue());
+
}
@Override