Author: ppitonak(a)redhat.com
Date: 2010-12-17 12:34:18 -0500 (Fri, 17 Dec 2010)
New Revision: 20664
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/TestRichSlider.java
Log:
* fixed testTypeIntoInputDecimal
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/TestRichSlider.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/TestRichSlider.java 2010-12-17
17:22:05 UTC (rev 20663)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInputNumberSlider/TestRichSlider.java 2010-12-17
17:34:18 UTC (rev 20664)
@@ -144,10 +144,10 @@
guardXhr(selenium).type(input, number);
waitGui.failWith("Page was not updated").waitForChange(reqTime,
retrieveText.locator(time));
- int roundedNumber = (int) Math.round(Double.parseDouble(number));
+ Double newNumber = new Double(number);
- assertEquals(selenium.getText(output), Integer.toString(roundedNumber),
"Output was not updated.");
- assertEquals(selenium.getValue(input), Integer.toString(roundedNumber),
"Input was not updated.");
+ assertEquals(selenium.getText(output), newNumber == 0 ? "0" :
newNumber.toString(), "Output was not updated.");
+ assertEquals(selenium.getValue(input), newNumber == 0 ? "0" :
newNumber.toString(), "Input was not updated.");
}
@Test
Show replies by date