aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/test/java/com/vaadin/data/ValidatorTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/test/java/com/vaadin/data/ValidatorTest.java')
-rw-r--r--server/src/test/java/com/vaadin/data/ValidatorTest.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/server/src/test/java/com/vaadin/data/ValidatorTest.java b/server/src/test/java/com/vaadin/data/ValidatorTest.java
index fa533c5010..9640550d95 100644
--- a/server/src/test/java/com/vaadin/data/ValidatorTest.java
+++ b/server/src/test/java/com/vaadin/data/ValidatorTest.java
@@ -33,17 +33,15 @@ public class ValidatorTest extends ValidatorTestBase {
@Test
public void alwaysPass() {
Validator<String> alwaysPass = Validator.alwaysPass();
- Result<String> result = alwaysPass.apply("foo", new ValueContext());
- Assert.assertTrue(result instanceof SimpleResult);
- SimpleResult<String> implRes = (SimpleResult<String>) result;
- Assert.assertFalse(implRes.getMessage().isPresent());
+ ValidationResult result = alwaysPass.apply("foo", new ValueContext());
+ Assert.assertFalse(result.isError());
}
@Test
public void from() {
Validator<String> validator = Validator.from(Objects::nonNull,
"Cannot be null");
- Result<String> result = validator.apply(null, new ValueContext());
+ ValidationResult result = validator.apply(null, new ValueContext());
Assert.assertTrue(result.isError());
result = validator.apply("", new ValueContext());