package com.vaadin.tests.components.table;
+import static junit.framework.TestCase.fail;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
public class ContainerSizeChangeTest extends MultiBrowserTest {
- @Rule
- public ExpectedException thrown = ExpectedException.none();
-
@Test
public void tableShouldLoadCorrectItems() throws IOException,
InterruptedException {
}
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));
+ }
}
}