Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* Main AssertJ Eclipse Collections Module
*/
module org.assertj.eclipse.collections {
exports org.assertj.eclipse.collections.api;
exports org.assertj.eclipse.collections.api.multimap;
exports org.assertj.eclipse.collections;
exports org.assertj.eclipse.collections.multimap;
exports org.assertj.eclipse.collections.error;

requires org.assertj.core;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.assertj.eclipse.collections.api;
package org.assertj.eclipse.collections;

import org.assertj.core.util.CheckReturnValue;
import org.assertj.eclipse.collections.api.multimap.MultimapAssert;
import org.assertj.eclipse.collections.multimap.MultimapAssert;
import org.eclipse.collections.api.multimap.Multimap;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.assertj.eclipse.collections.api;
package org.assertj.eclipse.collections;

import org.assertj.core.util.CheckReturnValue;
import org.assertj.eclipse.collections.api.multimap.MultimapAssert;
import org.assertj.eclipse.collections.multimap.MultimapAssert;
import org.eclipse.collections.api.multimap.Multimap;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.assertj.eclipse.collections.api;
package org.assertj.eclipse.collections;

import org.assertj.core.api.SoftAssertionsProvider;
import org.assertj.core.util.CheckReturnValue;
import org.assertj.eclipse.collections.api.multimap.MultimapAssert;
import org.assertj.eclipse.collections.multimap.MultimapAssert;
import org.eclipse.collections.api.multimap.Multimap;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.assertj.eclipse.collections.api;
package org.assertj.eclipse.collections;

import org.assertj.core.api.AbstractSoftAssertions;
import org.assertj.core.api.SoftAssertionsProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.assertj.eclipse.collections.api.multimap;
package org.assertj.eclipse.collections.multimap;

import static java.util.Objects.requireNonNull;
import static org.assertj.core.error.ShouldBeEmpty.shouldBeEmpty;
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Test module for AssertJ Eclipse Collections
*/
open module org.assertj.eclipse.collections.test {
exports org.assertj.eclipse.collections.test.api.multimap;
exports org.assertj.eclipse.collections.test.multimap;

requires org.assertj.eclipse.collections;
requires org.assertj.core;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.assertj.eclipse.collections.test.api.multimap;
package org.assertj.eclipse.collections.test.multimap;

import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatNoException;

import org.assertj.eclipse.collections.api.SoftAssertions;
import org.assertj.eclipse.collections.api.multimap.MultimapAssert;
import org.assertj.eclipse.collections.SoftAssertions;
import org.assertj.eclipse.collections.multimap.MultimapAssert;
import org.eclipse.collections.api.multimap.Multimap;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
Expand All @@ -28,13 +28,13 @@
class MultimapAssert_ContainsEntry_Test {

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#nonEmptyMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#nonEmptyMultimaps")
void passes(Multimap<String, String> actual) {
assertThatNoException().isThrownBy(() -> new MultimapAssert<>(actual).containsEntry("ENT", "Reed"));
}

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#emptyMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#emptyMultimaps")
void failsEmpty(Multimap<String, String> actual) {
assertThatExceptionOfType(AssertionError.class)
.isThrownBy(() -> new MultimapAssert<>(actual).containsEntry("ENT", "Reed"))
Expand All @@ -51,7 +51,7 @@ void failsNullMultimap() {
}

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#nonEmptyMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#nonEmptyMultimaps")
void failsMissingEntry(Multimap<String, String> actual) {
assertThatExceptionOfType(AssertionError.class)
.isThrownBy(() -> new MultimapAssert<>(actual).containsEntry("VOY", "Kes"))
Expand All @@ -61,7 +61,7 @@ void failsMissingEntry(Multimap<String, String> actual) {
}

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#nonEmptyMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#nonEmptyMultimaps")
void softAssertionPasses(Multimap<String, String> actual) {
SoftAssertions.assertSoftly(softly -> softly.assertThat(actual).containsEntry("ENT", "Reed"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.assertj.eclipse.collections.test.api.multimap;
package org.assertj.eclipse.collections.test.multimap;

import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatNoException;

import org.assertj.eclipse.collections.api.SoftAssertions;
import org.assertj.eclipse.collections.api.multimap.MultimapAssert;
import org.assertj.eclipse.collections.SoftAssertions;
import org.assertj.eclipse.collections.multimap.MultimapAssert;
import org.eclipse.collections.api.multimap.Multimap;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
Expand All @@ -28,13 +28,13 @@
class MultimapAssert_ContainsKeys_Test {

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#nonEmptyMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#nonEmptyMultimaps")
void passes(Multimap<String, String> actual) {
assertThatNoException().isThrownBy(() -> new MultimapAssert<>(actual).containsKeys("TOS", "TNG", "DS9"));
}

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#emptyMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#emptyMultimaps")
void failsEmpty(Multimap<String, String> actual) {
assertThatExceptionOfType(AssertionError.class)
.isThrownBy(() -> new MultimapAssert<>(actual).containsKeys("TOS", "TNG", "DS9"))
Expand All @@ -44,7 +44,7 @@ void failsEmpty(Multimap<String, String> actual) {
}

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#nonEmptyMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#nonEmptyMultimaps")
void failsMissingKey(Multimap<String, String> actual) {
assertThatExceptionOfType(AssertionError.class)
.isThrownBy(() -> new MultimapAssert<>(actual).containsKeys("DIS"))
Expand All @@ -61,7 +61,7 @@ void failsNullMultimap() {
}

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#nonEmptyMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#nonEmptyMultimaps")
void softAssertionPasses(Multimap<String, String> actual) {
SoftAssertions.assertSoftly(softly -> softly.assertThat(actual).containsKeys("TOS", "TNG", "DS9"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.assertj.eclipse.collections.test.api.multimap;
package org.assertj.eclipse.collections.test.multimap;

import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatNoException;
import static org.eclipse.collections.impl.tuple.Tuples.pair;

import java.util.Map;

import org.assertj.eclipse.collections.api.SoftAssertions;
import org.assertj.eclipse.collections.api.multimap.MultimapAssert;
import org.assertj.eclipse.collections.SoftAssertions;
import org.assertj.eclipse.collections.multimap.MultimapAssert;
import org.eclipse.collections.api.multimap.Multimap;
import org.eclipse.collections.api.tuple.Pair;
import org.junit.jupiter.api.Test;
Expand All @@ -32,7 +32,7 @@
class MultimapAssert_ContainsOnly_Test {

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#shipMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#shipMultimaps")
void passesWithPairs(Multimap<String, String> actual) {
Pair<String, String>[] exactMatchPairs = new Pair[]{
pair("TNG", "Enterprise"),
Expand All @@ -44,7 +44,7 @@ void passesWithPairs(Multimap<String, String> actual) {
}

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#shipMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#shipMultimaps")
void passesWithEntries(Multimap<String, String> actual) {
Map.Entry<String, String>[] exactMatchEntries = new Map.Entry[]{
pair("TNG", "Enterprise").toEntry(),
Expand All @@ -56,7 +56,7 @@ void passesWithEntries(Multimap<String, String> actual) {
}

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#shipMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#shipMultimaps")
void failsWhenAdditionalKeysOrValuesExistWithPair(Multimap<String, String> actual) {
Pair<String, String>[] partialMatchMissingPairs = new Pair[]{
pair("TNG", "Enterprise"),
Expand All @@ -70,7 +70,7 @@ void failsWhenAdditionalKeysOrValuesExistWithPair(Multimap<String, String> actua
}

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#shipMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#shipMultimaps")
void failsWhenAdditionalKeysOrValuesExistWithEntry(Multimap<String, String> actual) {
Map.Entry<String, String>[] partialMatchMissingEntries = new Map.Entry[]{
pair("TNG", "Enterprise").toEntry(),
Expand All @@ -84,7 +84,7 @@ void failsWhenAdditionalKeysOrValuesExistWithEntry(Multimap<String, String> actu
}

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#shipMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#shipMultimaps")
void failsWhenEntryIsMissingWithPair(Multimap<String, String> actual) {
Pair<String, String>[] partialMatchExtraPairs = new Pair[]{
pair("TOS", "Enterprise"),
Expand All @@ -100,7 +100,7 @@ void failsWhenEntryIsMissingWithPair(Multimap<String, String> actual) {
}

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#shipMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#shipMultimaps")
void failsWhenEntryIsMissingWithEntry(Multimap<String, String> actual) {
Map.Entry<String, String>[] partialMatchExtraEntries = new Map.Entry[]{
pair("TOS", "Enterprise").toEntry(),
Expand All @@ -116,7 +116,7 @@ void failsWhenEntryIsMissingWithEntry(Multimap<String, String> actual) {
}

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#emptyMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#emptyMultimaps")
void failsForEmptyMultimapWithPair(Multimap<String, String> actual) {
Pair<String, String>[] exactMatchPairs = new Pair[]{
pair("TNG", "Enterprise"),
Expand All @@ -129,7 +129,7 @@ void failsForEmptyMultimapWithPair(Multimap<String, String> actual) {
}

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#emptyMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#emptyMultimaps")
void failsForEmptyMultimapWithEntry(Multimap<String, String> actual) {
Map.Entry<String, String>[] exactMatchEntries = new Map.Entry[]{
pair("TNG", "Enterprise").toEntry(),
Expand Down Expand Up @@ -164,7 +164,7 @@ void failsForNullMultimapWithEntry() {
}

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#shipMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#shipMultimaps")
void softAssertionPassesWithPairs(Multimap<String, String> actual) {
Pair<String, String>[] exactMatchPairs = new Pair[]{
pair("TNG", "Enterprise"),
Expand All @@ -176,7 +176,7 @@ void softAssertionPassesWithPairs(Multimap<String, String> actual) {
}

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#shipMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#shipMultimaps")
void softAssertionPassesWithEntries(Multimap<String, String> actual) {
Map.Entry<String, String>[] exactMatchEntries = new Map.Entry[]{
pair("TNG", "Enterprise").toEntry(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.assertj.eclipse.collections.test.api.multimap;
package org.assertj.eclipse.collections.test.multimap;

import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatNoException;

import org.assertj.eclipse.collections.api.SoftAssertions;
import org.assertj.eclipse.collections.api.multimap.MultimapAssert;
import org.assertj.eclipse.collections.SoftAssertions;
import org.assertj.eclipse.collections.multimap.MultimapAssert;
import org.eclipse.collections.api.multimap.Multimap;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
Expand All @@ -28,13 +28,13 @@
class MultimapAssert_ContainsValues_Test {

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#nonEmptyMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#nonEmptyMultimaps")
void passes(Multimap<String, String> actual) {
assertThatNoException().isThrownBy(() -> new MultimapAssert<>(actual).containsValues("Kirk", "Picard", "Sisko", "Janeway", "Archer"));
}

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#emptyMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#emptyMultimaps")
void failsEmpty(Multimap<String, String> actual) {
assertThatExceptionOfType(AssertionError.class)
.isThrownBy(() -> new MultimapAssert<>(actual).containsValues("Kirk", "Picard", "Sisko", "Janeway", "Archer"))
Expand All @@ -44,7 +44,7 @@ void failsEmpty(Multimap<String, String> actual) {
}

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#nonEmptyMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#nonEmptyMultimaps")
void failsMissingValue(Multimap<String, String> actual) {
assertThatExceptionOfType(AssertionError.class)
.isThrownBy(() -> new MultimapAssert<>(actual).containsValues("Kes"))
Expand All @@ -61,7 +61,7 @@ void failsNullMultimap() {
}

@ParameterizedTest
@MethodSource("org.assertj.eclipse.collections.test.api.multimap.MultimapTestData#nonEmptyMultimaps")
@MethodSource("org.assertj.eclipse.collections.test.multimap.MultimapTestData#nonEmptyMultimaps")
void softAssertionPasses(Multimap<String, String> actual) {
SoftAssertions.assertSoftly(softly -> softly.assertThat(actual).containsValues("Kirk", "Picard", "Sisko", "Janeway", "Archer"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.assertj.eclipse.collections.test.api.multimap;
package org.assertj.eclipse.collections.test.multimap;

import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatNoException;
Expand All @@ -23,8 +23,8 @@
import java.util.Map;
import java.util.stream.Stream;

import org.assertj.eclipse.collections.api.SoftAssertions;
import org.assertj.eclipse.collections.api.multimap.MultimapAssert;
import org.assertj.eclipse.collections.SoftAssertions;
import org.assertj.eclipse.collections.multimap.MultimapAssert;
import org.eclipse.collections.api.multimap.Multimap;
import org.eclipse.collections.api.tuple.Pair;
import org.eclipse.collections.impl.tuple.Tuples;
Expand Down
Loading
Loading