Skip to content

Commit

Permalink
(#922) Add tests for other constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
vladhss committed Apr 7, 2019
1 parent d4b10da commit 2a79730
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/test/java/org/cactoos/scalar/EqualsNullableTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,22 @@ public void notEquals() throws Exception {
new IsTrue()
).affirm();
}

@Test
public void equalsObjectAndScalar() throws Exception {
new Assertion<>(
"Must return true for object and scalar with the same value",
new EqualsNullable(1, () -> 1),
new IsTrue()
).affirm();
}

@Test
public void equalsScalarAndObject() throws Exception {
new Assertion<>(
"Must return true for scalar and object with the same value",
new EqualsNullable(() -> 1, 1),
new IsTrue()
).affirm();
}
}

0 comments on commit 2a79730

Please sign in to comment.