summaryrefslogtreecommitdiffstats
path: root/test/widget-set-testutil
diff options
context:
space:
mode:
authorAhmed Ashour <asashour@yahoo.com>2017-10-03 12:56:25 +0200
committerHenri Sara <henri.sara@gmail.com>2017-10-03 13:56:25 +0300
commitccad305464af83826de4a4bd25a383360fb356d0 (patch)
treed399448d2910c4cf373e64c690b053740dff43ba /test/widget-set-testutil
parent28b52d687dade66154a4fcd545415bf0d01b0a53 (diff)
downloadvaadin-framework-ccad305464af83826de4a4bd25a383360fb356d0.tar.gz
vaadin-framework-ccad305464af83826de4a4bd25a383360fb356d0.zip
Use static import of Assert in tests (#10126)
Also removes dependency on junit.framework.TestCase .
Diffstat (limited to 'test/widget-set-testutil')
-rw-r--r--test/widget-set-testutil/src/main/java/com/vaadin/test/defaultwidgetset/AbstractWidgetSetIT.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/widget-set-testutil/src/main/java/com/vaadin/test/defaultwidgetset/AbstractWidgetSetIT.java b/test/widget-set-testutil/src/main/java/com/vaadin/test/defaultwidgetset/AbstractWidgetSetIT.java
index c6d4f1756b..28657067d3 100644
--- a/test/widget-set-testutil/src/main/java/com/vaadin/test/defaultwidgetset/AbstractWidgetSetIT.java
+++ b/test/widget-set-testutil/src/main/java/com/vaadin/test/defaultwidgetset/AbstractWidgetSetIT.java
@@ -1,8 +1,10 @@
package com.vaadin.test.defaultwidgetset;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
import java.util.List;
-import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.openqa.selenium.By;
@@ -44,26 +46,25 @@ public abstract class AbstractWidgetSetIT extends TestBenchTestCase {
$(ButtonElement.class).first().click();
- Assert.assertEquals("Label shown", 2,
- $(LabelElement.class).all().size());
+ assertEquals("Label shown", 2, $(LabelElement.class).all().size());
- Assert.assertEquals("Thanks John Dåe, it works!",
+ assertEquals("Thanks John Dåe, it works!",
$(LabelElement.class).get(1).getText());
- Assert.assertEquals(expectedWidgetSet,
+ assertEquals(expectedWidgetSet,
findElement(By.id("widgetsetinfo")).getText());
}
protected void assertNoUnknownComponentShown() {
- Assert.assertEquals(0,
+ assertEquals(0,
findElements(By.className("vaadin-unknown-caption")).size());
}
protected void assertUnknownComponentShown(String componentClass) {
WebElement unknownComponentCaption = findElement(
By.className("vaadin-unknown-caption"));
- Assert.assertTrue(unknownComponentCaption.getText().contains(
+ assertTrue(unknownComponentCaption.getText().contains(
"does not contain implementation for " + componentClass));
}
@@ -77,8 +78,7 @@ public abstract class AbstractWidgetSetIT extends TestBenchTestCase {
break;
}
}
- Assert.assertTrue(
- "Cannot find debug message containing '" + message + "'",
+ assertTrue("Cannot find debug message containing '" + message + "'",
found);
}