issue #335 typos fixed

This commit is contained in:
Crossy147 2016-02-20 14:55:37 +01:00
parent f47b9283c3
commit 64f1fe8979
2 changed files with 3 additions and 3 deletions

View File

@ -32,4 +32,4 @@ Use the Monad in any of the following situations
* [Design Pattern Reloaded by Remi Forax](https://youtu.be/-k2X7guaArU)
* [Brian Beckman: Don't fear the Monad](https://channel9.msdn.com/Shows/Going+Deep/Brian-Beckman-Dont-fear-the-Monads)
* [Monad (functional programming) on Wikipedia] (https://en.wikipedia.org/wiki/Monad_(functional_programming)
* [Monad on Wikipedia](https://en.wikipedia.org/wiki/Monad_(functional_programming)

View File

@ -23,7 +23,7 @@ public class MonadTest {
@Test
public void testForInvalidAge() {
thrown.expect(IllegalStateException.class);
User tom = new User("John", 17, Sex.MALE, "john@qwe.bar");
User john = new User("John", 17, Sex.MALE, "john@qwe.bar");
Validator.of(tom).validate(User::getName, Objects::nonNull, "name cannot be null")
.validate(User::getAge, age -> age > 21, "user is underaged")
.get();
@ -31,7 +31,7 @@ public class MonadTest {
@Test
public void testForValid() {
User tom = new User("Sarah", 42, Sex.FEMALE, "sarah@det.org");
User sarah = new User("Sarah", 42, Sex.FEMALE, "sarah@det.org");
User validated = Validator.of(tom).validate(User::getName, Objects::nonNull, "name cannot be null")
.validate(User::getAge, age -> age > 21, "user is underaged")
.validate(User::getSex, sex -> sex == Sex.FEMALE, "user is not female")