New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1549: Add ctor to map.Merged #1550
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,8 @@ | |
*/ | ||
package org.cactoos.map; | ||
|
||
import org.cactoos.iterable.IterableOf; | ||
import org.hamcrest.core.AllOf; | ||
import org.hamcrest.core.IsEqual; | ||
import org.junit.Test; | ||
import org.llorllale.cactoos.matchers.Assertion; | ||
|
@@ -35,6 +37,27 @@ | |
*/ | ||
public final class MergedTest { | ||
|
||
@Test | ||
public void behavesAsMapCreatedFromIterable() { | ||
new Assertion<>( | ||
"Must behave as a map", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @andreoss I suggest this message : |
||
new Merged<>( | ||
new MapOf<>( | ||
new MapEntry<>("a", 1) | ||
), | ||
new MapOf<>( | ||
new MapEntry<>("b", 2) | ||
) | ||
), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @andreoss I think you wanted to test new Merged<>(
new IterableOf<>(
new MapOf<>(
new MapEntry<>("a", 1)
),
new MapOf<>(
new MapEntry<>("b", 2)
)
)
) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @baudoliver7 Actually not, there's not need to test There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @andreoss That's right ! But it's because of the test name ( |
||
new AllOf<>( | ||
new IterableOf<>( | ||
new BehavesAsMap<>("a", 1), | ||
new BehavesAsMap<>("b", 2) | ||
) | ||
) | ||
).affirm(); | ||
} | ||
|
||
@Test | ||
public void behavesAsMap() { | ||
new Assertion<>( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andreoss I suggest to write as description :
Iterable of {@link Map}s to merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baudoliver7 Fixed.