summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorSauli Tähkäpää <sauli@vaadin.com>2014-10-03 08:14:48 +0300
committerSauli Tähkäpää <sauli@vaadin.com>2014-10-03 08:15:13 +0300
commit71e16a6bfaafb51c623f64b84d711ce1385106e6 (patch)
treeab9d39fb3d86abab523b1df18076b4c3d78b5d87 /uitest
parent6348ac89fb3dfecf90b3543b3d86ac04ece42a5e (diff)
downloadvaadin-framework-71e16a6bfaafb51c623f64b84d711ce1385106e6.tar.gz
vaadin-framework-71e16a6bfaafb51c623f64b84d711ce1385106e6.zip
Fix ContainerSizeChangeTest not to produce failure shots every time.
Change-Id: I3cacc581d6991e6b760e2b3ae43a63dafac071b3
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/components/table/ContainerSizeChangeTest.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/uitest/src/com/vaadin/tests/components/table/ContainerSizeChangeTest.java b/uitest/src/com/vaadin/tests/components/table/ContainerSizeChangeTest.java
index 041b23749c..e13238e10d 100644
--- a/uitest/src/com/vaadin/tests/components/table/ContainerSizeChangeTest.java
+++ b/uitest/src/com/vaadin/tests/components/table/ContainerSizeChangeTest.java
@@ -1,5 +1,6 @@
package com.vaadin.tests.components.table;
+import static junit.framework.TestCase.fail;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
@@ -19,9 +20,6 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
public class ContainerSizeChangeTest extends MultiBrowserTest {
- @Rule
- public ExpectedException thrown = ExpectedException.none();
-
@Test
public void tableShouldLoadCorrectItems() throws IOException,
InterruptedException {
@@ -52,11 +50,12 @@ public class ContainerSizeChangeTest extends MultiBrowserTest {
}
private void assertRowDoesNotExist(TableElement table, int rowIndex) {
- // This is a really crappy way to workaround JUnit's limitation to
- // provide a proper assert.throws method...
- thrown.expect(NoSuchElementException.class);
- table.getCell(rowIndex, 0);
+ try {
+ table.getCell(rowIndex, 0);
+
+ fail(String.format("Row %s should not exists.", rowIndex));
+ } catch (NoSuchElementException e) {
- Assert.fail(String.format("Row %s should not exists.", rowIndex));
+ }
}
}