Skip to content

Commit f97416b

Browse files
javier-godoypaodb
authored andcommitted
test: use matcher instead of assertion
1 parent 61f39d4 commit f97416b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/test/java/com/flowingcode/vaadin/addons/xterm/integration/FitFeatureIT.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
*/
2020
package com.flowingcode.vaadin.addons.xterm.integration;
2121

22-
import static org.junit.Assert.assertEquals;
23-
import static org.junit.Assert.assertTrue;
22+
import static org.hamcrest.Matchers.is;
23+
import static org.hamcrest.Matchers.lessThanOrEqualTo;
24+
import static org.junit.Assert.assertThat;
2425
import org.junit.Test;
2526
import org.openqa.selenium.Dimension;
2627

@@ -40,7 +41,7 @@ public void testFeature() {
4041
return w != colsBefore ? w : null;
4142
});
4243

43-
assertTrue(colsAfter * 2 <= colsBefore);
44+
assertThat(colsAfter * 2, is(lessThanOrEqualTo(colsBefore)));
4445

4546
getDriver().manage().window().setSize(dimension);
4647

@@ -49,6 +50,6 @@ public void testFeature() {
4950
return w != colsAfter ? w : null;
5051
});
5152

52-
assertEquals(colsBefore, colsRestored);
53+
assertThat(colsRestored, is(colsBefore));
5354
}
5455
}

0 commit comments

Comments
 (0)