We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f47b928 commit 64f1fe8Copy full SHA for 64f1fe8
2 files changed
monad/index.md
@@ -32,4 +32,4 @@ Use the Monad in any of the following situations
32
33
* [Design Pattern Reloaded by Remi Forax](https://youtu.be/-k2X7guaArU)
34
* [Brian Beckman: Don't fear the Monad](https://channel9.msdn.com/Shows/Going+Deep/Brian-Beckman-Dont-fear-the-Monads)
35
-* [Monad (functional programming) on Wikipedia] (https://en.wikipedia.org/wiki/Monad_(functional_programming)
+* [Monad on Wikipedia](https://en.wikipedia.org/wiki/Monad_(functional_programming)
monad/src/test/java/com/iluwatar/monad/MonadTest.java
@@ -23,15 +23,15 @@ public void testForInvalidName() {
23
@Test
24
public void testForInvalidAge() {
25
thrown.expect(IllegalStateException.class);
26
- User tom = new User("John", 17, Sex.MALE, "john@qwe.bar");
+ User john = new User("John", 17, Sex.MALE, "john@qwe.bar");
27
Validator.of(tom).validate(User::getName, Objects::nonNull, "name cannot be null")
28
.validate(User::getAge, age -> age > 21, "user is underaged")
29
.get();
30
}
31
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")
36
37
.validate(User::getSex, sex -> sex == Sex.FEMALE, "user is not female")
0 commit comments