Skip to content

Commit

Permalink
(yegor256#1396) Undo changes in org.cactoos.map
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoss committed Jul 12, 2020
1 parent 44540d9 commit 2138d81
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/test/java/org/cactoos/map/BehavesAsMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

import java.util.Map;
import org.hamcrest.Description;
import org.hamcrest.MatcherAssert;
import org.hamcrest.TypeSafeMatcher;
import org.hamcrest.collection.IsMapContaining;
import org.hamcrest.core.IsCollectionContaining;
import org.hamcrest.core.IsEqual;
import org.llorllale.cactoos.matchers.Assertion;

/**
* Matcher for collection.
Expand Down Expand Up @@ -63,24 +63,24 @@ public BehavesAsMap(final K akey, final V val) {

@Override
public boolean matchesSafely(final Map<K, V> map) {
new Assertion<>(
MatcherAssert.assertThat(
"Doesn't contain the key",
map,
new IsMapContaining<>(
new IsEqual<>(this.key),
new IsEqual<>(this.value)
)
).affirm();
new Assertion<>(
);
MatcherAssert.assertThat(
"Doesn't contain the key in #keySet()",
map.keySet(),
new IsCollectionContaining<>(new IsEqual<>(this.key))
).affirm();
new Assertion<>(
);
MatcherAssert.assertThat(
"Doesn't contain the value in #values()",
map.values(),
new IsCollectionContaining<>(new IsEqual<>(this.value))
).affirm();
);
return true;
}

Expand Down

0 comments on commit 2138d81

Please sign in to comment.