Skip to content

Commit 05ca4f9

Browse files
mchmielarzpivovarit
authored andcommitted
Javadoc updates (#16)
Fixes #14
1 parent 3b0cc63 commit 05ca4f9

File tree

4 files changed

+36
-2
lines changed

4 files changed

+36
-2
lines changed

pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<name>AssertJ fluent assertions for Vavr</name>
1212
<description>Rich and fluent assertions for testing Vavr tools</description>
1313
<inceptionYear>2017</inceptionYear>
14+
1415
<scm>
1516
<developerConnection>scm:git:[email protected]:assertj/assertj-vavr.git</developerConnection>
1617
<connection>scm:git:[email protected]:assertj/assertj-vavr.git</connection>
@@ -40,6 +41,7 @@
4041
<version>4.12</version>
4142
</dependency>
4243
</dependencies>
44+
4345
<build>
4446
<plugins>
4547
<plugin>
@@ -51,6 +53,20 @@
5153
<target>1.8</target>
5254
</configuration>
5355
</plugin>
56+
57+
<plugin>
58+
<groupId>org.apache.maven.plugins</groupId>
59+
<artifactId>maven-javadoc-plugin</artifactId>
60+
<version>2.10.3</version>
61+
<executions>
62+
<execution>
63+
<id>attach-javadocs</id>
64+
<goals>
65+
<goal>jar</goal>
66+
</goals>
67+
</execution>
68+
</executions>
69+
</plugin>
5470
<!-- generate jacoco report -->
5571
</plugins>
5672
</build>

src/main/java/org/assertj/vavr/api/AbstractOptionAssert.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public SELF isEmpty() {
7676
}
7777

7878
/**
79-
* Verifies that the actual {@link io.vavr.control.Option} contains the given value (alias of {@link #hasValue(Object)}).
79+
* Verifies that the actual {@link io.vavr.control.Option} contains the given value.
8080
*
8181
* @param expectedValue the expected value inside the {@link io.vavr.control.Option}.
8282
* @return this assertion object.
@@ -190,6 +190,7 @@ public SELF containsSame(VALUE expectedValue) {
190190
/**
191191
* 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.
192192
*
193+
* @param <U> the type of a value contained in {@link Option}.
193194
* @param mapper the {@link Function} to use in the {@link Option#flatMap(Function) flatMap} operation.
194195
* @return a new {@link org.assertj.vavr.api.AbstractOptionAssert} for assertions chaining on the flatMap of the Option.
195196
* @throws AssertionError if the actual {@link Option} is null.
@@ -203,6 +204,7 @@ public <U> AbstractOptionAssert<?, U> flatMap(Function<? super VALUE, Option<U>>
203204
/**
204205
* 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.
205206
*
207+
* @param <U> the type of a value contained in {@link Option}.
206208
* @param mapper the {@link Function} to use in the {@link Option#map(Function) map} operation.
207209
* @return a new {@link org.assertj.vavr.api.AbstractOptionAssert} for assertions chaining on the map of the Option.
208210
* @throws AssertionError if the actual {@link Option} is null.

src/main/java/org/assertj/vavr/api/AbstractTryAssert.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ public SELF containsSame(VALUE expectedValue) {
170170
/**
171171
* 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.
172172
*
173+
* @param <U> type of a value contained by successful {@link Try} created by {@code mapper} function
173174
* @param mapper the {@link Function} to use in the {@link Try#flatMap(Function) flatMap} operation.
175+
*
174176
* @return a new {@link org.assertj.vavr.api.AbstractTryAssert} for assertions chaining on the flatMap of the Try.
175177
* @throws AssertionError if the actual {@link Try} is null.
176178
*/
@@ -183,7 +185,9 @@ public <U> AbstractTryAssert<?, U> flatMap(Function<? super VALUE, Try<U>> mappe
183185
/**
184186
* 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.
185187
*
188+
* @param <U> type of a value created by {@code mapper} function
186189
* @param mapper the {@link Function} to use in the {@link Try#map(Function) map} operation.
190+
*
187191
* @return a new {@link org.assertj.vavr.api.AbstractTryAssert} for assertions chaining on the map of the Try.
188192
* @throws AssertionError if the actual {@link Try} is null.
189193
*/
@@ -194,9 +198,11 @@ public <U> AbstractTryAssert<?, U> map(Function<? super VALUE, ? extends U> mapp
194198
}
195199

196200
/**
197-
* Verifies that the actual @{@link io.vavr.control.Try} fails because of specific {@link Throwable}.
201+
* Verifies that the actual {@link Try} fails because of specific {@link Throwable}.
198202
*
203+
* @param <U> specific type of {@link Throwable}
199204
* @param reason the expected exception class.
205+
*
200206
* @return this assertion object.
201207
*/
202208
public <U extends Throwable> SELF failBecauseOf(Class<U> reason) {

src/main/java/org/assertj/vavr/api/VavrAssertions.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ private VavrAssertions() {
3232
/**
3333
* Create assertion for {@link io.vavr.control.Either}.
3434
*
35+
* @param <LEFT> the type of a value contained on left by <code>actual {@link Either}</code>.
36+
* @param <RIGHT> the type of a value contained on right by <code>actual {@link Either}</code>.
37+
* @param actual the actual value.
38+
*
3539
* @return the created assertion object.
3640
*/
3741
@CheckReturnValue
@@ -42,6 +46,9 @@ public static <LEFT, RIGHT> EitherAssert<LEFT, RIGHT> assertThat(Either<LEFT, RI
4246
/**
4347
* Create assertion for {@link io.vavr.control.Option}.
4448
*
49+
* @param <VALUE> the type of a value contained by <code>actual {@link Option}</code>.
50+
* @param actual the actual value.
51+
*
4552
* @return the created assertion object.
4653
*/
4754
@CheckReturnValue
@@ -52,6 +59,9 @@ public static <VALUE> OptionAssert<VALUE> assertThat(Option<VALUE> actual) {
5259
/**
5360
* Create assertion for {@link io.vavr.control.Try}.
5461
*
62+
* @param <VALUE> the type of a value contained by <code>actual {@link Try}</code>.
63+
* @param actual the actual value.
64+
*
5565
* @return the created assertion object.
5666
*/
5767
@CheckReturnValue

0 commit comments

Comments
 (0)