diff options
Diffstat (limited to 'server/src/test/java/com/vaadin/tests/util/TestUtil.java')
-rw-r--r-- | server/src/test/java/com/vaadin/tests/util/TestUtil.java | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/server/src/test/java/com/vaadin/tests/util/TestUtil.java b/server/src/test/java/com/vaadin/tests/util/TestUtil.java index eb5bd5e525..e98d6c07ab 100644 --- a/server/src/test/java/com/vaadin/tests/util/TestUtil.java +++ b/server/src/test/java/com/vaadin/tests/util/TestUtil.java @@ -1,13 +1,14 @@ package com.vaadin.tests.util; -import java.util.Iterator; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; -import org.junit.Assert; +import java.util.Iterator; public class TestUtil { public static void assertArrays(Object[] actualObjects, Object[] expectedObjects) { - Assert.assertEquals( + assertEquals( "Actual contains a different number of values than was expected", expectedObjects.length, actualObjects.length); @@ -15,8 +16,7 @@ public class TestUtil { Object actual = actualObjects[i]; Object expected = expectedObjects[i]; - Assert.assertEquals("Item[" + i + "] does not match", expected, - actual); + assertEquals("Item[" + i + "] does not match", expected, actual); } } @@ -29,18 +29,15 @@ public class TestUtil { while (i1.hasNext()) { Object o1 = i1.next(); if (!i2.hasNext()) { - Assert.fail( - "The second iterable contains fewer items than the first. The object " - + o1 + " has no match in the second iterable."); + fail("The second iterable contains fewer items than the first. The object " + + o1 + " has no match in the second iterable."); } Object o2 = i2.next(); - Assert.assertEquals(o1, o2); + assertEquals(o1, o2); } if (i2.hasNext()) { - Assert.fail( - "The second iterable contains more items than the first. The object " - + i2.next() - + " has no match in the first iterable."); + fail("The second iterable contains more items than the first. The object " + + i2.next() + " has no match in the first iterable."); } } |