Skip to content

Commit

Permalink
(#927) Revert tests to use multiple entries in maps
Browse files Browse the repository at this point in the history
  • Loading branch information
vladhss committed Apr 8, 2019
1 parent 15b1011 commit 296a460
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
5 changes: 3 additions & 2 deletions src/test/java/org/cactoos/map/MapOfTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ public void behavesAsMap() {
"Can't behave as a map",
new NoNulls<>(
new MapOf<Integer, Integer>(
new MapEntry<>(0, 1)
new MapEntry<>(0, -1),
new MapEntry<>(1, 1)
)
),
new BehavesAsMap<>(0, 1)
new BehavesAsMap<>(1, 1)
);
}

Expand Down
10 changes: 6 additions & 4 deletions src/test/java/org/cactoos/map/SolidTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ public void behavesAsMap() {
MatcherAssert.assertThat(
"Can't behave as a map",
new Solid<Integer, Integer>(
new MapEntry<>(0, 1)
new MapEntry<>(0, -1),
new MapEntry<>(1, 1)
),
new BehavesAsMap<>(0, 1)
new BehavesAsMap<>(1, 1)
);
}

Expand All @@ -66,13 +67,14 @@ public void worksInThreads() {
MatcherAssert.assertThat(
"Can't behave as a map in thread",
map,
new BehavesAsMap<>(0, 1)
new BehavesAsMap<>(1, 1)
);
return true;
},
new RunsInThreads<>(
new Solid<Integer, Integer>(
new MapEntry<>(0, 1)
new MapEntry<>(0, -1),
new MapEntry<>(1, 1)
)
)
);
Expand Down
5 changes: 3 additions & 2 deletions src/test/java/org/cactoos/map/StickyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ public void behavesAsMap() {
MatcherAssert.assertThat(
"Can't behave as a map",
new Sticky<Integer, Integer>(
new MapEntry<>(0, 1)
new MapEntry<>(0, -1),
new MapEntry<>(1, 1)
),
new BehavesAsMap<>(0, 1)
new BehavesAsMap<>(1, 1)
);
}

Expand Down
10 changes: 6 additions & 4 deletions src/test/java/org/cactoos/map/SyncedTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ public void behavesAsMap() {
MatcherAssert.assertThat(
"Can't behave as a map",
new Synced<Integer, Integer>(
new MapEntry<>(0, 1)
new MapEntry<>(0, -1),
new MapEntry<>(1, 1)
),
new BehavesAsMap<>(0, 1)
new BehavesAsMap<>(1, 1)
);
}

Expand All @@ -55,13 +56,14 @@ public void worksInThreads() {
MatcherAssert.assertThat(
"Can't behave as a map in thread",
map,
new BehavesAsMap<>(0, 1)
new BehavesAsMap<>(1, 1)
);
return true;
},
new RunsInThreads<>(
new Synced<Integer, Integer>(
new MapEntry<>(0, 1)
new MapEntry<>(0, -1),
new MapEntry<>(1, 1)
)
)
);
Expand Down

0 comments on commit 296a460

Please sign in to comment.