Skip to content

Commit

Permalink
Small cleanups: (#1058)
Browse files Browse the repository at this point in the history
* Add some missing since tags
* Make the ConfigurationProvider constructor private
* Do some rewording and fix some typos around the new SPI Representation
  • Loading branch information
filiphr authored and joel-costigliola committed Aug 19, 2017
1 parent f30b707 commit e8c99c3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/assertj/core/api/Assertions.java
Expand Up @@ -2146,7 +2146,7 @@ public static void useDefaultDateFormatsOnly() {
* <p>
* An alternative way of using a different representation is to register one as a service,
* this approach is described in {@link Representation}, it requires more work than this method
* but has the advantage of not having to do do anything in your tests.
* but has the advantage of not having to do anything in your tests and it would be applied to all the tests globally
* <p>
* Example :
* <pre><code class='java'> private class Example {}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/assertj/core/api/Assumptions.java
Expand Up @@ -50,7 +50,7 @@

/**
* Entry point for assumption methods for different types, which allow to skip test execution on failed assumptions.
* @since 2.9.0
* @since 2.9.0 / 3.9.0
*/
public class Assumptions {

Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/assertj/core/api/HamcrestCondition.java
Expand Up @@ -28,6 +28,7 @@
*
* // assertion will fail
* assertThat(&quot;bc&quot;).is(aStringContainingA);</code></pre>
* @since 2.9.0 / 3.9.0
*/
public class HamcrestCondition<T> extends Condition<T> {

Expand Down
Expand Up @@ -30,7 +30,7 @@ public final class ConfigurationProvider {

private final Representation defaultRepresentation;

public ConfigurationProvider() {
private ConfigurationProvider() {
defaultRepresentation = Services.get(Representation.class, STANDARD_REPRESENTATION);
}

Expand Down
Expand Up @@ -28,9 +28,11 @@
* <p>
* To register a {@link Representation}, you need to do several things:
* <ul>
* <li>create a file named in {@code org.assertj.core.presentation.Representation} file in META-INF/services directory</li>
* <li>create a file named {@code org.assertj.core.presentation.Representation} file in META-INF/services directory</li>
* <li>put the fully qualified class name of your {@link Representation} in it</li>
* <li>make sure {@code META-INF/services/org.assertj.core.presentation.Representation} is in the runtime classpath, usually putting it in {@code src/main/resources} is enough</li>
* <li>make sure {@code META-INF/services/org.assertj.core.presentation.Representation} is in the runtime classpath, usually putting it in {@code src/test/resources} is enough</li>
* <li>we recommend that you extend from the {@link StandardRepresentation} and override the
* {@link StandardRepresentation#fallbackToStringOf(Object)}. By doing this all the defaults of AssertJ would be applied and you can apply your own customization</li>
* </ul>
* <p>
* The <a href="https://github.com/joel-costigliola/assertj-examples/tree/master/assertions-examples">assertj-examples</a> project provides a working example of registering a custom representation.
Expand Down

0 comments on commit e8c99c3

Please sign in to comment.