🎨 Gradle-6 Format JavaDoc
This commit is contained in:
parent
3a26ab3460
commit
b9331afc8f
|
@ -5,10 +5,14 @@ import io.reactivex.Observable;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/** Demonstrates a library type that returns an RxJava type. */
|
/**
|
||||||
|
* Demonstrates a library type that returns an RxJava type.
|
||||||
|
*/
|
||||||
public class RxHelloWorld {
|
public class RxHelloWorld {
|
||||||
|
|
||||||
/** @return an {@link Observable} that emits events "hello" and "world" before completing. */
|
/**
|
||||||
|
* @return an {@link Observable} that emits events "hello" and "world" before completing.
|
||||||
|
*/
|
||||||
public static Observable<String> hello() {
|
public static Observable<String> hello() {
|
||||||
// Guava ImmutableList class is an implementation detail.
|
// Guava ImmutableList class is an implementation detail.
|
||||||
List<String> values = ImmutableList.of("hello", "world");
|
List<String> values = ImmutableList.of("hello", "world");
|
||||||
|
|
|
@ -4,9 +4,10 @@ import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import static com.baeldung.gradle.RxHelloWorld.hello;
|
import static com.baeldung.gradle.RxHelloWorld.hello;
|
||||||
|
|
||||||
/** Unit test for {@link RxHelloWorld}. */
|
/**
|
||||||
|
* Unit test for {@link RxHelloWorld}.
|
||||||
|
*/
|
||||||
final class RxHelloWorldUnitTest {
|
final class RxHelloWorldUnitTest {
|
||||||
|
|
||||||
@Test void it_emits_hello_world_values() {
|
@Test void it_emits_hello_world_values() {
|
||||||
hello().test().assertValues("hello", "world").assertComplete();
|
hello().test().assertValues("hello", "world").assertComplete();
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,9 @@ package com.baeldung.fibonacci.impl;
|
||||||
import com.baeldung.fibonacci.FibonacciSequenceGenerator;
|
import com.baeldung.fibonacci.FibonacciSequenceGenerator;
|
||||||
import com.google.auto.service.AutoService;
|
import com.google.auto.service.AutoService;
|
||||||
|
|
||||||
/** Recursive implementation of the {@link FibonacciSequenceGenerator}. */
|
/**
|
||||||
|
* Recursive implementation of the {@link FibonacciSequenceGenerator}.
|
||||||
|
*/
|
||||||
@AutoService(FibonacciSequenceGenerator.class) public final class RecursiveFibonacci implements FibonacciSequenceGenerator {
|
@AutoService(FibonacciSequenceGenerator.class) public final class RecursiveFibonacci implements FibonacciSequenceGenerator {
|
||||||
|
|
||||||
@Override public int generate(int nth) {
|
@Override public int generate(int nth) {
|
||||||
|
|
|
@ -4,8 +4,7 @@ import com.baeldung.fibonacci.FibonacciSequenceGenerator;
|
||||||
import com.baeldung.fibonacci.FibonacciSequenceGeneratorFixture;
|
import com.baeldung.fibonacci.FibonacciSequenceGeneratorFixture;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unit test which reuses the {@link FibonacciSequenceGeneratorFixture} test mix-in exported from
|
* Unit test which reuses the {@link FibonacciSequenceGeneratorFixture} test mix-in exported from the fibonacci-spi project.
|
||||||
* the fibonacci-spi project.
|
|
||||||
*/
|
*/
|
||||||
final class RecursiveFibonacciUnitTest implements FibonacciSequenceGeneratorFixture {
|
final class RecursiveFibonacciUnitTest implements FibonacciSequenceGeneratorFixture {
|
||||||
@Override public FibonacciSequenceGenerator provide() {
|
@Override public FibonacciSequenceGenerator provide() {
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.baeldung.fibonacci;
|
package com.baeldung.fibonacci;
|
||||||
|
|
||||||
/** Describes an SPI for a Fibonacci sequence generator function. */
|
/**
|
||||||
|
* Describes an SPI for a Fibonacci sequence generator function.
|
||||||
|
*/
|
||||||
public interface FibonacciSequenceGenerator {
|
public interface FibonacciSequenceGenerator {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -6,12 +6,13 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reusable test fixture for {@link FibonacciSequenceGenerator} implementations. Tests will be
|
* Reusable test fixture for {@link FibonacciSequenceGenerator} implementations. Tests will be skipped if no such implementation exists.
|
||||||
* skipped if no such implementation exists.
|
|
||||||
*/
|
*/
|
||||||
public interface FibonacciSequenceGeneratorFixture {
|
public interface FibonacciSequenceGeneratorFixture {
|
||||||
|
|
||||||
/** @return the implementation of {@link FibonacciSequenceGenerator} to test. Must not be null */
|
/**
|
||||||
|
* @return the implementation of {@link FibonacciSequenceGenerator} to test. Must not be null
|
||||||
|
*/
|
||||||
FibonacciSequenceGenerator provide();
|
FibonacciSequenceGenerator provide();
|
||||||
|
|
||||||
@Test default void when_sequence_index_is_negative_then_throws() {
|
@Test default void when_sequence_index_is_negative_then_throws() {
|
||||||
|
|
Loading…
Reference in New Issue