diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0f2d9fce37..12512a2e4a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,7 +18,7 @@ We appreciate your effort and to make sure that your pull request is easy to rev * Put GIVEN WHEN THEN steps in each test, favoring `BDDAssertions.then` instead of `Assertions.assertThat` for assertions in the THEN step. Steps can be combined or omitted if a separate step does not provide much benefit to test readability, just ensure that the WHEN step (either single or combined) contains the test target. * Use `AssertionUtil.expectAssertionError` for tests expecting to get an `AssertionError` - see `OptionalAssert_containsInstanceOf_Test` as an example.. * Use static import when it makes the code more readable. -* If possible, add a (fun) code example in [assertj-examples](https://github.com/joel-costigliola/assertj-examples) and use it in the javadoc. +* If possible, add a (fun) code example in [assertj-examples](https://github.com/assertj/assertj-examples) and use it in the javadoc. A good unit test to use as a reference is `OptionalAssert_containsInstanceOf_Test`. Here's a sample below: @@ -53,7 +53,7 @@ class OptionalAssert_containsInstanceOf_Test extends BaseTest { It's ok not to follow some of the rules described above if you have a good reason not to (use your best judgement) -[assertj-examples](https://github.com/joel-costigliola/assertj-examples) shows how to efficiently use AssertJ through fun unit test examples, it can be seen as AssertJs living documentation. +[assertj-examples](https://github.com/assertj/assertj-examples) shows how to efficiently use AssertJ through fun unit test examples, it can be seen as AssertJs living documentation. ## Rebase your PR on main (no merge!) diff --git a/README.md b/README.md index 3f9df43986..92baa37079 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # AssertJ - Fluent assertions for java -[![Github CI status](https://github.com/joel-costigliola/assertj-core/workflows/CI/badge.svg)](https://github.com/joel-costigliola/assertj-core/actions?query=workflow%3ACI) -[![Github Cross-Version status](https://github.com/joel-costigliola/assertj-core/workflows/Cross-Version/badge.svg)](https://github.com/joel-costigliola/assertj-core/actions?query=workflow%3ACross-Version) +[![Github CI status](https://github.com/assertj/assertj-core/workflows/CI/badge.svg)](https://github.assertj-costigliola/assertj-core/actions?query=workflow%3ACI) +[![Github Cross-Version status](https://github.com/assertj/assertj-core/workflows/Cross-Version/badge.svg)](https://github.com/assertj/assertj-core/actions?query=workflow%3ACross-Version) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.assertj/assertj-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.assertj/assertj-core) [![Javadocs](http://www.javadoc.io/badge/org.assertj/assertj-core.svg)](http://www.javadoc.io/doc/org.assertj/assertj-core) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=joel-costigliola_assertj-core&metric=alert_status)](https://sonarcloud.io/dashboard?id=joel-costigliola_assertj-core) @@ -28,13 +28,13 @@ a `Map`? Use Map-specific assertions to easily check the contents of the map. AssertJ is composed of several modules: * A core module (this one) to provide assertions for JDK types (`String`, `Iterable`, `Stream`, `Path`, `File`, `Map`...) - see [AssertJ Core documentation](https://assertj.github.io/doc/#assertj-core-assertions-guide) and [javadoc](https://www.javadoc.io/doc/org.assertj/assertj-core/latest/index.html). -* A **[Guava module](https://github.com/joel-costigliola/assertj-guava#readme)** to provide assertions for Guava types (`Multimap`, `Optional`...) - see [AssertJ Guava documentation](http://joel-costigliola.github.io/assertj/assertj-guava.html) and [javadoc](http://joel-costigliola.github.io/assertj/guava/api/index.html). -* A **[Joda Time module](https://github.com/joel-costigliola/assertj-joda-time#readme)** to provide assertions for Joda Time types (`DateTime`, `LocalDateTime`) - see [AssertJ Joda Time documentation](http://joel-costigliola.github.io/assertj/assertj-joda-time.html) and [javadoc](http://joel-costigliola.github.io/assertj/jodatime/api/index.html). -* A **[Neo4J module](https://github.com/joel-costigliola/assertj-neo4j#readme)** to provide assertions for Neo4J types (`Path`, `Node`, `Relationship`...) - see [AssertJ Neo4J documentation](http://joel-costigliola.github.io/assertj/assertj-neo4j.html) and [javadoc](http://joel-costigliola.github.io/assertj/neo4j/api/index.html). -* A **[DB module](https://github.com/joel-costigliola/assertj-db#readme)** to provide assertions for relational database types (`Table`, `Row`, `Column`...) - see [AssertJ DB documentation](http://joel-costigliola.github.io/assertj/assertj-db.html) and [javadoc](http://joel-costigliola.github.io/assertj/db/current/api/index.html). -* A **[Swing module](https://github.com/joel-costigliola/assertj-swing#readme)** provides a simple and intuitive API for functional testing of Swing user interfaces - see [AssertJ Swing documentation](http://joel-costigliola.github.io/assertj/assertj-swing.html) and [javadoc](http://joel-costigliola.github.io/assertj/swing/api/index.html). +* A **[Guava module](https://github.com/assertj/assertj-guava#readme)** to provide assertions for Guava types (`Multimap`, `Optional`...) - see [AssertJ Guava documentation](https://assertj.github.io/doc/#assertj-guava) and [javadoc](https://www.javadoc.io/doc/org.assertj/assertj-guava/latest/index.html). +* A **[Joda Time module](https://github.com/assertj/assertj-joda-time#readme)** to provide assertions for Joda Time types (`DateTime`, `LocalDateTime`) - see [AssertJ Joda Time documentation](http://joel-costigliola.github.io/assertj/assertj-joda-time.html) and [javadoc](https://www.javadoc.io/doc/org.assertj/assertj-joda-time/latest/index.html). +* A **[Neo4J module](https://github.com/assertj/assertj-neo4j#readme)** to provide assertions for Neo4J types (`Path`, `Node`, `Relationship`...) - see [AssertJ Neo4J documentation](http://joel-costigliola.github.io/assertj/assertj-neo4j.html) and [javadoc](https://www.javadoc.io/doc/org.assertj/assertj-neo4j/latest/index.html). +* A **[DB module](https://github.com/assertj/assertj-db#readme)** to provide assertions for relational database types (`Table`, `Row`, `Column`...) - see [AssertJ DB documentation](https://assertj.github.io/doc/#assertj-db) and [javadoc](https://www.javadoc.io/doc/org.assertj/assertj-db/latest/index.html). +* A **[Swing module](https://github.com/assertj/assertj-swing#readme)** provides a simple and intuitive API for functional testing of Swing user interfaces - see [AssertJ Swing documentation](http://joel-costigliola.github.io/assertj/assertj-swing.html) and [javadoc](https://www.javadoc.io/doc/org.assertj/assertj-swing/latest/index.html). -Assertion missing? Please [create an issue](https://github.com/joel-costigliola/assertj-core/issues)! +Assertion missing? Please [create an issue](https://github.com/assertj/assertj-core/issues)! AssertJ's assertions are super easy to use: just type **```assertThat```** followed by the actual value in parentheses and a dot, then any Java IDE will show you all assertions available for the type of the object. No more confusion about the @@ -64,8 +64,8 @@ Moreover, to ease your work, we provide assertions generator that can take a set ## Replacing JUnit assertions with AssertJ Assertions -To help you [**replace JUnit assertions**](http://joel-costigliola.github.io/assertj/assertj-core-converting-junit-assertions-to-assertj.html) with AssertJ ones, you can use a [**script**](http://joel-costigliola.github.io/assertj/assertj-core-converting-junit-assertions-to-assertj.html#automatic-conversion) or do regexp search and replace manually as described [**here**](http://joel-costigliola.github.io/assertj/assertj-core-converting-junit-assertions-to-assertj.html#manual-conversion). +To help you [**replace JUnit assertions**](https://assertj.github.io/doc/#assertj-migration) with AssertJ ones, you can use a [**script**](https://assertj.github.io/doc/#assertj-migration-using-scripts) or do regexp search and replace manually as described [**here**](https://assertj.github.io/doc/#assertj-migration-using-regexes). ## Want to contribute? -You are encouraged to contribute any missing, useful assertions. To do so, please read the [contributing section](https://github.com/joel-costigliola/assertj-core/blob/main/CONTRIBUTING.md). +You are encouraged to contribute any missing, useful assertions. To do so, please read the [contributing section](https://github.com/assertj/assertj-core/blob/main/CONTRIBUTING.md). diff --git a/pom.xml b/pom.xml index 574e789175..47fafcaa2d 100644 --- a/pom.xml +++ b/pom.xml @@ -13,23 +13,15 @@ 2.2.8 - - - AssertJ Group - http://groups.google.com/group/assertj - http://groups.google.com/group/assertj - http://groups.google.com/group/assertj - - - scm:git:git@github.com:joel-costigliola/assertj-core.git - scm:git:git@github.com:joel-costigliola/assertj-core.git - git@github.com:joel-costigliola/assertj-core + scm:git:git@github.com:assertj/assertj-core.git + scm:git:git@github.com:assertj/assertj-core.git + git@github.com:assertj/assertj-core HEAD github - https://github.com/joel-costigliola/assertj-core/issues + https://github.com/assertj/assertj-core/issues @@ -510,7 +502,7 @@ en_US - + 8 ${project.build.directory}/javadoc-stylesheet/assertj-javadoc-min.css diff --git a/src/main/java/org/assertj/core/api/AbstractAssert.java b/src/main/java/org/assertj/core/api/AbstractAssert.java index 8026a0f671..582dc66188 100644 --- a/src/main/java/org/assertj/core/api/AbstractAssert.java +++ b/src/main/java/org/assertj/core/api/AbstractAssert.java @@ -65,7 +65,7 @@ */ public abstract class AbstractAssert, ACTUAL> implements Assert { - // https://github.com/joel-costigliola/assertj-core/issues/1128 + // https://github.com/assertj/assertj-core/issues/1128 public static boolean throwUnsupportedExceptionOnEquals = true; private static final String ORG_ASSERTJ = "org.assert"; diff --git a/src/main/java/org/assertj/core/api/filter/FilterOperator.java b/src/main/java/org/assertj/core/api/filter/FilterOperator.java index fc51762915..3c06001dc7 100644 --- a/src/main/java/org/assertj/core/api/filter/FilterOperator.java +++ b/src/main/java/org/assertj/core/api/filter/FilterOperator.java @@ -14,12 +14,11 @@ public abstract class FilterOperator { - private static final String COMBINING_OPERATOR_IS_NOT_SUPPORTED = "Combining operator is not supported, but you can use Filters as in http://joel-costigliola.github.io/assertj/assertj-core-features-highlight.html#filters"; + private static final String COMBINING_OPERATOR_IS_NOT_SUPPORTED = "Combining operator is not supported, but you can use Filters, see filteredOn methods in https://www.javadoc.io/doc/org.assertj/assertj-core/latest/org/assertj/core/api/AbstractIterableAssert.html"; protected final T filterParameter; protected FilterOperator(T filterValue) { - if (filterValue instanceof FilterOperator) - throw new UnsupportedOperationException(COMBINING_OPERATOR_IS_NOT_SUPPORTED); + if (filterValue instanceof FilterOperator) throw new UnsupportedOperationException(COMBINING_OPERATOR_IS_NOT_SUPPORTED); this.filterParameter = filterValue; } diff --git a/src/main/java/org/assertj/core/presentation/Representation.java b/src/main/java/org/assertj/core/presentation/Representation.java index 35d721b6d6..b45630ae80 100644 --- a/src/main/java/org/assertj/core/presentation/Representation.java +++ b/src/main/java/org/assertj/core/presentation/Representation.java @@ -35,7 +35,7 @@ * {@link StandardRepresentation#fallbackToStringOf(Object)}. By doing this all the defaults of AssertJ would be applied and you can apply your own customization * *

- * The assertj-examples project provides a working example of registering a custom representation. + * The assertj-examples project provides a working example of registering a custom representation. *

* Registering a representation has been introduced in AssertJ 2.9.0/3.9.0. * diff --git a/src/main/scripts/convert-junit5-assertions-to-assertj.sh b/src/main/scripts/convert-junit5-assertions-to-assertj.sh index db5401bfe0..1e71209b9a 100755 --- a/src/main/scripts/convert-junit5-assertions-to-assertj.sh +++ b/src/main/scripts/convert-junit5-assertions-to-assertj.sh @@ -6,7 +6,7 @@ function usage() { echo "convert-junit5-assertions-to-assertj.sh - Converts most of JUnit 5 assertions to AssertJ assertions" echo echo "AUTHOR" - echo "this script is based on JUnit 4 script found at http://joel-costigliola.github.io/assertj/assertj-core-converting-junit-assertions-to-assertj.html + echo "this script is based on JUnit 4 script found at https://assertj.github.io/doc/#assertj-migration The changes in regexps are mostly due to the fact the order arguments changed in JUnit 5 (i.e. message moved to the last position). Kudos to whoever wrote the original script!" echo diff --git a/src/test/java/org/assertj/core/api/WithAssertions_delegation_Test.java b/src/test/java/org/assertj/core/api/WithAssertions_delegation_Test.java index 41486d3c25..d47325603c 100644 --- a/src/test/java/org/assertj/core/api/WithAssertions_delegation_Test.java +++ b/src/test/java/org/assertj/core/api/WithAssertions_delegation_Test.java @@ -945,12 +945,12 @@ void withAssertions_assertThat_doublePredicate_Test() { @Test void withAssertions_assertThat_url_Test() throws MalformedURLException { - assertThat(new URL("https://github.com/joel-costigliola/assertj-core")).hasHost("github.com"); + assertThat(new URL("https://github.com/assertj/assertj-core")).hasHost("github.com"); } @Test void withAssertions_assertThat_uri_Test() { - assertThat(java.net.URI.create("https://github.com/joel-costigliola/assertj-core")).hasHost("github.com"); + assertThat(java.net.URI.create("https://github.com/assertj/assertj-core")).hasHost("github.com"); } @Test diff --git a/src/test/java/org/assertj/core/api/iterable/SetAssert_raw_set_assertions_chained_after_superclass_method_Test.java b/src/test/java/org/assertj/core/api/iterable/SetAssert_raw_set_assertions_chained_after_superclass_method_Test.java index 61201dd8b4..1072618e2a 100644 --- a/src/test/java/org/assertj/core/api/iterable/SetAssert_raw_set_assertions_chained_after_superclass_method_Test.java +++ b/src/test/java/org/assertj/core/api/iterable/SetAssert_raw_set_assertions_chained_after_superclass_method_Test.java @@ -78,7 +78,7 @@ void raw_set_assertions_mixed_with_inherited_methods() { @SuppressWarnings({ "unchecked", "rawtypes" }) @Test void test_bug_485() { - // https://github.com/joel-costigliola/assertj-core/issues/485 + // https://github.com/assertj/assertj-core/issues/485 Set set = new java.util.HashSet<>(); set.add("Key1"); set.add("Key2"); diff --git a/src/test/java/org/assertj/core/api/list/ListAssert_raw_list_assertions_chained_after_superclass_method_Test.java b/src/test/java/org/assertj/core/api/list/ListAssert_raw_list_assertions_chained_after_superclass_method_Test.java index 20a19a6a8d..64000b1552 100644 --- a/src/test/java/org/assertj/core/api/list/ListAssert_raw_list_assertions_chained_after_superclass_method_Test.java +++ b/src/test/java/org/assertj/core/api/list/ListAssert_raw_list_assertions_chained_after_superclass_method_Test.java @@ -80,7 +80,7 @@ void raw_list_assertions_mixed_with_inherited_methods() { @SuppressWarnings({ "unchecked", "rawtypes" }) @Test void test_bug_485() { - // https://github.com/joel-costigliola/assertj-core/issues/485 + // https://github.com/assertj/assertj-core/issues/485 List list = new java.util.ArrayList<>(); list.add("Key1"); list.add("Key2"); diff --git a/src/test/java/org/assertj/core/api/map/MapAssert_raw_map_assertions_chained_after_base_assertions_Test.java b/src/test/java/org/assertj/core/api/map/MapAssert_raw_map_assertions_chained_after_base_assertions_Test.java index 6266d679b1..530ce204d7 100644 --- a/src/test/java/org/assertj/core/api/map/MapAssert_raw_map_assertions_chained_after_base_assertions_Test.java +++ b/src/test/java/org/assertj/core/api/map/MapAssert_raw_map_assertions_chained_after_base_assertions_Test.java @@ -74,7 +74,7 @@ void raw_map_mixing_assertions_from_AbstractAssert_and_AbstractMapAssert() { @SuppressWarnings({ "unchecked", "rawtypes" }) @Test void test_bug_485() { - // https://github.com/joel-costigliola/assertj-core/issues/485 + // https://github.com/assertj/assertj-core/issues/485 Map map1 = new java.util.HashMap<>(); map1.put("Key1", "Value1"); map1.put("Key2", "Value2"); diff --git a/src/test/java/org/assertj/core/api/objectarray/ObjectArrayAssert_extracting_Test.java b/src/test/java/org/assertj/core/api/objectarray/ObjectArrayAssert_extracting_Test.java index 46ba563eb7..6f6d235cd0 100644 --- a/src/test/java/org/assertj/core/api/objectarray/ObjectArrayAssert_extracting_Test.java +++ b/src/test/java/org/assertj/core/api/objectarray/ObjectArrayAssert_extracting_Test.java @@ -270,7 +270,7 @@ void should_allow_assertions_on_more_than_five_extracted_values_from_given_itera tuple("Boromir", 37, MAN, "Boromir", 37, MAN)); } - // https://github.com/joel-costigliola/assertj-core/issues/880 + // https://github.com/assertj/assertj-core/issues/880 @Test void should_be_able_to_extract_values_returned_from_default_methods_from_given_iterable_elements() { List people = asList(new Person()); diff --git a/src/test/java/org/assertj/core/internal/strings/Strings_assertContainsOnlyDigits_Test.java b/src/test/java/org/assertj/core/internal/strings/Strings_assertContainsOnlyDigits_Test.java index f1a3ce3cef..3d3bd9a29d 100644 --- a/src/test/java/org/assertj/core/internal/strings/Strings_assertContainsOnlyDigits_Test.java +++ b/src/test/java/org/assertj/core/internal/strings/Strings_assertContainsOnlyDigits_Test.java @@ -44,7 +44,7 @@ void should_fail_if_actual_contains_any_non_digit_character() { } /** - * See discussion on failing the assertion for empty CharSequence + * See discussion on failing the assertion for empty CharSequence */ @Test void should_fail_if_actual_is_empty() { diff --git a/src/test/java/org/assertj/core/perf/ContainsOnlyPerfTest.java b/src/test/java/org/assertj/core/perf/ContainsOnlyPerfTest.java index 4e8e32999b..3bf06bfb5b 100644 --- a/src/test/java/org/assertj/core/perf/ContainsOnlyPerfTest.java +++ b/src/test/java/org/assertj/core/perf/ContainsOnlyPerfTest.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Timeout; /** - * See https://github.com/joel-costigliola/assertj-core/issues/1718. + * See https://github.com/assertj/assertj-core/issues/1718. * * This test ensures assertThat(list_of_1m_elements).containsOnly(...) is an O(N) rather than O(N^2) * operation. Given that the list has 1 million elements, O(N^2) is O(1000 billion), which should diff --git a/src/test/java/org/assertj/core/presentation/StandardRepresentation_iterable_format_Test.java b/src/test/java/org/assertj/core/presentation/StandardRepresentation_iterable_format_Test.java index 1c7469a7d5..6ee9cb6388 100644 --- a/src/test/java/org/assertj/core/presentation/StandardRepresentation_iterable_format_Test.java +++ b/src/test/java/org/assertj/core/presentation/StandardRepresentation_iterable_format_Test.java @@ -214,7 +214,7 @@ void should_only_consider_root_object_for_cycles() { then(formatted).isEqualTo("[[1, 2, 3], [1, 2, 3]]"); } - // see https://github.com/joel-costigliola/assertj-core/issues/1990 + // see https://github.com/assertj/assertj-core/issues/1990 @Test public void should_use_overridden_toString_over_iterable_representation() { // GIVEN