From 76d6923a5a87b88e5dbfb1b23a37a9df3f723bac Mon Sep 17 00:00:00 2001 From: Joel Costigliola Date: Sun, 17 Jul 2016 21:09:31 +1200 Subject: [PATCH] Improve generated javadoc comments. --- ...d_assertions_entry_point_class_template.txt | 3 +-- ...t_assertions_entry_point_class_template.txt | 3 +-- ...t_assertions_entry_point_class_template.txt | 5 +++-- ...t_assertions_entry_point_class_template.txt | 18 ++++++++++++++++-- ...t_assertions_entry_point_class_template.txt | 3 +-- .../resources/BDDSoftAssertions.expected.txt | 3 +-- src/test/resources/BddAssertions.expected.txt | 3 +-- .../JUnitBDDSoftAssertions.expected.txt | 5 +++-- .../resources/JUnitSoftAssertions.expected.txt | 18 ++++++++++++++++-- src/test/resources/SoftAssertions.expected.txt | 3 +-- 10 files changed, 44 insertions(+), 20 deletions(-) diff --git a/src/main/resources/templates/bdd_assertions_entry_point_class_template.txt b/src/main/resources/templates/bdd_assertions_entry_point_class_template.txt index bef19e1..e8ac7e3 100644 --- a/src/main/resources/templates/bdd_assertions_entry_point_class_template.txt +++ b/src/main/resources/templates/bdd_assertions_entry_point_class_template.txt @@ -1,8 +1,7 @@ package ${package}; /** - * Entry point for BDD assertions of different data types. Each method in this class is a static factory for the - * type-specific assertion objects. + * Entry point for BDD assertions of different data types. */ @javax.annotation.Generated(value="assertj-assertions-generator") public class BddAssertions { diff --git a/src/main/resources/templates/bdd_soft_assertions_entry_point_class_template.txt b/src/main/resources/templates/bdd_soft_assertions_entry_point_class_template.txt index f5a6f90..7f1a146 100644 --- a/src/main/resources/templates/bdd_soft_assertions_entry_point_class_template.txt +++ b/src/main/resources/templates/bdd_soft_assertions_entry_point_class_template.txt @@ -1,8 +1,7 @@ package ${package}; /** - * Entry point for BDD soft assertions of different data types. Each method in this class is a static factory for the - * type-specific assertion objects. + * Entry point for BDD soft assertions of different data types. */ @javax.annotation.Generated(value="assertj-assertions-generator") public class BDDSoftAssertions extends org.assertj.core.api.BDDSoftAssertions { diff --git a/src/main/resources/templates/junit_bdd_soft_assertions_entry_point_class_template.txt b/src/main/resources/templates/junit_bdd_soft_assertions_entry_point_class_template.txt index 6771b64..103e18b 100644 --- a/src/main/resources/templates/junit_bdd_soft_assertions_entry_point_class_template.txt +++ b/src/main/resources/templates/junit_bdd_soft_assertions_entry_point_class_template.txt @@ -1,8 +1,8 @@ package ${package}; /** - * Like {@link SoftAssertions} but as a junit rule which can be used without having to call - * {@link SoftAssertions#assertAll() assertAll()}, + * Like {@link BDDSoftAssertions} but as a junit rule that takes care of calling + * {@link SoftAssertions#assertAll() assertAll()} at the end of each test. *

* Example: *

 public class SoftlyTest {
@@ -14,6 +14,7 @@ package ${package};
  *     public void soft_bdd_assertions() throws Exception {
  *       softly.then(1).isEqualTo(2);
  *       softly.then(Lists.newArrayList(1, 2)).containsOnly(1, 2);
+ *       // no need to call assertAll(), this is done automatically.
  *     }
  *  }
*/ diff --git a/src/main/resources/templates/junit_soft_assertions_entry_point_class_template.txt b/src/main/resources/templates/junit_soft_assertions_entry_point_class_template.txt index 4386d75..1a0a6ed 100644 --- a/src/main/resources/templates/junit_soft_assertions_entry_point_class_template.txt +++ b/src/main/resources/templates/junit_soft_assertions_entry_point_class_template.txt @@ -1,8 +1,22 @@ package ${package}; /** - * Entry point for assertions of different data types. Each method in this class is a static factory for the - * type-specific assertion objects. + * Like {@link SoftAssertions} but as a junit rule that takes care of calling + * {@link SoftAssertions#assertAll() assertAll()} at the end of each test. + *

+ * Example: + *

 public class SoftlyTest {
+ *
+ *     @Rule
+ *     public final JUnitBDDSoftAssertions softly = new JUnitBDDSoftAssertions();
+ *
+ *     @Test
+ *     public void soft_bdd_assertions() throws Exception {
+ *       softly.assertThat(1).isEqualTo(2);
+ *       softly.assertThat(Lists.newArrayList(1, 2)).containsOnly(1, 2);
+ *       // no need to call assertAll(), this is done automatically.
+ *     }
+ *  }
*/ @javax.annotation.Generated(value="assertj-assertions-generator") public class JUnitSoftAssertions extends org.assertj.core.api.JUnitSoftAssertions { diff --git a/src/main/resources/templates/soft_assertions_entry_point_class_template.txt b/src/main/resources/templates/soft_assertions_entry_point_class_template.txt index e3afc4b..7b1b0d4 100644 --- a/src/main/resources/templates/soft_assertions_entry_point_class_template.txt +++ b/src/main/resources/templates/soft_assertions_entry_point_class_template.txt @@ -1,8 +1,7 @@ package ${package}; /** - * Entry point for assertions of different data types. Each method in this class is a static factory for the - * type-specific assertion objects. + * Entry point for soft assertions of different data types. */ @javax.annotation.Generated(value="assertj-assertions-generator") public class SoftAssertions extends org.assertj.core.api.SoftAssertions { diff --git a/src/test/resources/BDDSoftAssertions.expected.txt b/src/test/resources/BDDSoftAssertions.expected.txt index f84fdf4..bb70462 100644 --- a/src/test/resources/BDDSoftAssertions.expected.txt +++ b/src/test/resources/BDDSoftAssertions.expected.txt @@ -1,8 +1,7 @@ package org.assertj.assertions.generator.data; /** - * Entry point for BDD soft assertions of different data types. Each method in this class is a static factory for the - * type-specific assertion objects. + * Entry point for BDD soft assertions of different data types. */ @javax.annotation.Generated(value="assertj-assertions-generator") public class BDDSoftAssertions extends org.assertj.core.api.BDDSoftAssertions { diff --git a/src/test/resources/BddAssertions.expected.txt b/src/test/resources/BddAssertions.expected.txt index dacb66c..8d100bc 100644 --- a/src/test/resources/BddAssertions.expected.txt +++ b/src/test/resources/BddAssertions.expected.txt @@ -1,8 +1,7 @@ package org.assertj.assertions.generator.data; /** - * Entry point for BDD assertions of different data types. Each method in this class is a static factory for the - * type-specific assertion objects. + * Entry point for BDD assertions of different data types. */ @javax.annotation.Generated(value="assertj-assertions-generator") public class BddAssertions { diff --git a/src/test/resources/JUnitBDDSoftAssertions.expected.txt b/src/test/resources/JUnitBDDSoftAssertions.expected.txt index 2a1ebac..2d2f957 100644 --- a/src/test/resources/JUnitBDDSoftAssertions.expected.txt +++ b/src/test/resources/JUnitBDDSoftAssertions.expected.txt @@ -1,8 +1,8 @@ package org.assertj.assertions.generator.data; /** - * Like {@link SoftAssertions} but as a junit rule which can be used without having to call - * {@link SoftAssertions#assertAll() assertAll()}, + * Like {@link BDDSoftAssertions} but as a junit rule that takes care of calling + * {@link SoftAssertions#assertAll() assertAll()} at the end of each test. *

* Example: *

 public class SoftlyTest {
@@ -14,6 +14,7 @@ package org.assertj.assertions.generator.data;
  *     public void soft_bdd_assertions() throws Exception {
  *       softly.then(1).isEqualTo(2);
  *       softly.then(Lists.newArrayList(1, 2)).containsOnly(1, 2);
+ *       // no need to call assertAll(), this is done automatically.
  *     }
  *  }
*/ diff --git a/src/test/resources/JUnitSoftAssertions.expected.txt b/src/test/resources/JUnitSoftAssertions.expected.txt index 7a39880..681cbd6 100644 --- a/src/test/resources/JUnitSoftAssertions.expected.txt +++ b/src/test/resources/JUnitSoftAssertions.expected.txt @@ -1,8 +1,22 @@ package org.assertj.assertions.generator.data; /** - * Entry point for assertions of different data types. Each method in this class is a static factory for the - * type-specific assertion objects. + * Like {@link SoftAssertions} but as a junit rule that takes care of calling + * {@link SoftAssertions#assertAll() assertAll()} at the end of each test. + *

+ * Example: + *

 public class SoftlyTest {
+ *
+ *     @Rule
+ *     public final JUnitBDDSoftAssertions softly = new JUnitBDDSoftAssertions();
+ *
+ *     @Test
+ *     public void soft_bdd_assertions() throws Exception {
+ *       softly.assertThat(1).isEqualTo(2);
+ *       softly.assertThat(Lists.newArrayList(1, 2)).containsOnly(1, 2);
+ *       // no need to call assertAll(), this is done automatically.
+ *     }
+ *  }
*/ @javax.annotation.Generated(value="assertj-assertions-generator") public class JUnitSoftAssertions extends org.assertj.core.api.JUnitSoftAssertions { diff --git a/src/test/resources/SoftAssertions.expected.txt b/src/test/resources/SoftAssertions.expected.txt index 2b49311..ce41375 100644 --- a/src/test/resources/SoftAssertions.expected.txt +++ b/src/test/resources/SoftAssertions.expected.txt @@ -1,8 +1,7 @@ package org.assertj.assertions.generator.data; /** - * Entry point for assertions of different data types. Each method in this class is a static factory for the - * type-specific assertion objects. + * Entry point for soft assertions of different data types. */ @javax.annotation.Generated(value="assertj-assertions-generator") public class SoftAssertions extends org.assertj.core.api.SoftAssertions {