aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/test/java/com/vaadin/data/HasValueTest.java
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 /server/src/test/java/com/vaadin/data/HasValueTest.java
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 'server/src/test/java/com/vaadin/data/HasValueTest.java')
-rw-r--r--server/src/test/java/com/vaadin/data/HasValueTest.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/server/src/test/java/com/vaadin/data/HasValueTest.java b/server/src/test/java/com/vaadin/data/HasValueTest.java
index 5f255454c9..5b3a996740 100644
--- a/server/src/test/java/com/vaadin/data/HasValueTest.java
+++ b/server/src/test/java/com/vaadin/data/HasValueTest.java
@@ -15,9 +15,11 @@
*/
package com.vaadin.data;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertSame;
+
import java.time.LocalDate;
-import org.junit.Assert;
import org.junit.Test;
import org.mockito.Mockito;
@@ -58,14 +60,13 @@ public class HasValueTest {
assert nullable.isEmpty();
assert nullable.getValue() == null;
- Assert.assertFalse(nullable.getOptionalValue().isPresent());
+ assertFalse(nullable.getOptionalValue().isPresent());
nullable.setValue(LocalDate.now());
assert !nullable.isEmpty();
- Assert.assertSame(nullable.getValue(),
- nullable.getOptionalValue().get());
+ assertSame(nullable.getValue(), nullable.getOptionalValue().get());
}
@Test
@@ -77,13 +78,13 @@ public class HasValueTest {
assert nonNullable.isEmpty();
assert nonNullable.getValue() != null;
- Assert.assertFalse(nonNullable.getOptionalValue().isPresent());
+ assertFalse(nonNullable.getOptionalValue().isPresent());
nonNullable.setValue("foo");
assert !nonNullable.isEmpty();
- Assert.assertSame(nonNullable.getValue(),
+ assertSame(nonNullable.getValue(),
nonNullable.getOptionalValue().get());
}
}