Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
rickie committed Feb 2, 2022
1 parent 462a93d commit 4b1eee7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ static final class AbstractMapAssertContainsExactlyEntriesOf<K, V> {
}
}

static final class AbstractMapAssertContainsEntry<K, V> {
static final class AbstractMapAssertContainsOnly<K, V> {
@BeforeTemplate
AbstractMapAssert<?, ?, K, V> before(AbstractMapAssert<?, ?, K, V> mapAssert, K key, V value) {
return mapAssert.containsExactlyInAnyOrderEntriesOf(ImmutableMap.of(key, value));
}

@AfterTemplate
AbstractMapAssert<?, ?, K, V> after(AbstractMapAssert<?, ?, K, V> mapAssert, K key, V value) {
return mapAssert.containsExactly(Map.entry(key, value));
return mapAssert.containsOnly(Map.entry(key, value));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ final class AssertJMapTemplatesTest implements RefasterTemplateTestCase {
return assertThat(ImmutableMap.of(1, 2, 3, 4)).isEqualTo(ImmutableMap.of(1, 2, 3, 4));
}

AbstractMapAssert<?, ?, Integer, Integer> testAbstractMapAssertContainsEntry() {
AbstractMapAssert<?, ?, Integer, Integer> testAbstractMapAssertContainsOnly() {
return assertThat(ImmutableMap.of(1, 2))
.containsExactlyInAnyOrderEntriesOf(ImmutableMap.of(1, 2));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ final class AssertJMapTemplatesTest implements RefasterTemplateTestCase {
.containsExactlyInAnyOrderEntriesOf(ImmutableMap.of(1, 2, 3, 4));
}

AbstractMapAssert<?, ?, Integer, Integer> testAbstractMapAssertContainsEntry() {
return assertThat(ImmutableMap.of(1, 2)).containsExactly(Map.entry(1, 2));
AbstractMapAssert<?, ?, Integer, Integer> testAbstractMapAssertContainsOnly() {
return assertThat(ImmutableMap.of(1, 2)).containsOnly(Map.entry(1, 2));
}
}

0 comments on commit 4b1eee7

Please sign in to comment.