Skip to content

Commit

Permalink
Javadoc updates (#16)
Browse files Browse the repository at this point in the history
Fixes #14
  • Loading branch information
mchmielarz authored and pivovarit committed Jun 17, 2018
1 parent 3b0cc63 commit 05ca4f9
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
16 changes: 16 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<name>AssertJ fluent assertions for Vavr</name>
<description>Rich and fluent assertions for testing Vavr tools</description>
<inceptionYear>2017</inceptionYear>

<scm>
<developerConnection>scm:git:[email protected]:assertj/assertj-vavr.git</developerConnection>
<connection>scm:git:[email protected]:assertj/assertj-vavr.git</connection>
Expand Down Expand Up @@ -40,6 +41,7 @@
<version>4.12</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
Expand All @@ -51,6 +53,20 @@
<target>1.8</target>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- generate jacoco report -->
</plugins>
</build>
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/org/assertj/vavr/api/AbstractOptionAssert.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public SELF isEmpty() {
}

/**
* Verifies that the actual {@link io.vavr.control.Option} contains the given value (alias of {@link #hasValue(Object)}).
* Verifies that the actual {@link io.vavr.control.Option} contains the given value.
*
* @param expectedValue the expected value inside the {@link io.vavr.control.Option}.
* @return this assertion object.
Expand Down Expand Up @@ -190,6 +190,7 @@ public SELF containsSame(VALUE expectedValue) {
/**
* Call {@link Option#flatMap(Function) flatMap} on the {@code Option} under test, assertions chained afterwards are performed on the {@code Option} resulting from the flatMap call.
*
* @param <U> the type of a value contained in {@link Option}.
* @param mapper the {@link Function} to use in the {@link Option#flatMap(Function) flatMap} operation.
* @return a new {@link org.assertj.vavr.api.AbstractOptionAssert} for assertions chaining on the flatMap of the Option.
* @throws AssertionError if the actual {@link Option} is null.
Expand All @@ -203,6 +204,7 @@ public <U> AbstractOptionAssert<?, U> flatMap(Function<? super VALUE, Option<U>>
/**
* Call {@link Option#map(Function) map} on the {@code Option} under test, assertions chained afterwards are performed on the {@code Option} resulting from the map call.
*
* @param <U> the type of a value contained in {@link Option}.
* @param mapper the {@link Function} to use in the {@link Option#map(Function) map} operation.
* @return a new {@link org.assertj.vavr.api.AbstractOptionAssert} for assertions chaining on the map of the Option.
* @throws AssertionError if the actual {@link Option} is null.
Expand Down
8 changes: 7 additions & 1 deletion src/main/java/org/assertj/vavr/api/AbstractTryAssert.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ public SELF containsSame(VALUE expectedValue) {
/**
* Call {@link Try#flatMap(Function) flatMap} on the {@code Try} under test, assertions chained afterwards are performed on the {@code Try} resulting from the flatMap call.
*
* @param <U> type of a value contained by successful {@link Try} created by {@code mapper} function
* @param mapper the {@link Function} to use in the {@link Try#flatMap(Function) flatMap} operation.
*
* @return a new {@link org.assertj.vavr.api.AbstractTryAssert} for assertions chaining on the flatMap of the Try.
* @throws AssertionError if the actual {@link Try} is null.
*/
Expand All @@ -183,7 +185,9 @@ public <U> AbstractTryAssert<?, U> flatMap(Function<? super VALUE, Try<U>> mappe
/**
* Call {@link Try#map(Function) map} on the {@code Try} under test, assertions chained afterwards are performed on the {@code Try} resulting from the map call.
*
* @param <U> type of a value created by {@code mapper} function
* @param mapper the {@link Function} to use in the {@link Try#map(Function) map} operation.
*
* @return a new {@link org.assertj.vavr.api.AbstractTryAssert} for assertions chaining on the map of the Try.
* @throws AssertionError if the actual {@link Try} is null.
*/
Expand All @@ -194,9 +198,11 @@ public <U> AbstractTryAssert<?, U> map(Function<? super VALUE, ? extends U> mapp
}

/**
* Verifies that the actual @{@link io.vavr.control.Try} fails because of specific {@link Throwable}.
* Verifies that the actual {@link Try} fails because of specific {@link Throwable}.
*
* @param <U> specific type of {@link Throwable}
* @param reason the expected exception class.
*
* @return this assertion object.
*/
public <U extends Throwable> SELF failBecauseOf(Class<U> reason) {
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/org/assertj/vavr/api/VavrAssertions.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ private VavrAssertions() {
/**
* Create assertion for {@link io.vavr.control.Either}.
*
* @param <LEFT> the type of a value contained on left by <code>actual {@link Either}</code>.
* @param <RIGHT> the type of a value contained on right by <code>actual {@link Either}</code>.
* @param actual the actual value.
*
* @return the created assertion object.
*/
@CheckReturnValue
Expand All @@ -42,6 +46,9 @@ public static <LEFT, RIGHT> EitherAssert<LEFT, RIGHT> assertThat(Either<LEFT, RI
/**
* Create assertion for {@link io.vavr.control.Option}.
*
* @param <VALUE> the type of a value contained by <code>actual {@link Option}</code>.
* @param actual the actual value.
*
* @return the created assertion object.
*/
@CheckReturnValue
Expand All @@ -52,6 +59,9 @@ public static <VALUE> OptionAssert<VALUE> assertThat(Option<VALUE> actual) {
/**
* Create assertion for {@link io.vavr.control.Try}.
*
* @param <VALUE> the type of a value contained by <code>actual {@link Try}</code>.
* @param actual the actual value.
*
* @return the created assertion object.
*/
@CheckReturnValue
Expand Down

0 comments on commit 05ca4f9

Please sign in to comment.