mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-14 08:58:26 +00:00
refactor: sanitize javadoc
This commit is contained in:
+1
-2
@@ -44,9 +44,8 @@ import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
|
||||
/**
|
||||
* Date: 12/6/15 - 10:49 AM
|
||||
* ThreadAsyncExecutorTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class ThreadAsyncExecutorTest {
|
||||
|
||||
|
||||
@@ -31,9 +31,8 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/6/15 - 11:01 PM
|
||||
* HeroTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class HeroTest {
|
||||
|
||||
|
||||
@@ -30,9 +30,8 @@ import java.util.List;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/6/15 - 9:29 PM
|
||||
* OrcKingTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class OrcKingTest {
|
||||
|
||||
|
||||
@@ -34,9 +34,8 @@ import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/11/15 - 8:12 PM
|
||||
* MessengerTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class MessengerTest {
|
||||
|
||||
|
||||
@@ -37,9 +37,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
/**
|
||||
* Date: 10/24/2022 - 3:18
|
||||
* ServiceContextTest
|
||||
*
|
||||
* @author Chak Chan
|
||||
*/
|
||||
public class ServiceContextTest {
|
||||
|
||||
|
||||
@@ -54,7 +54,6 @@ import lombok.Setter;
|
||||
/**
|
||||
* Base for data to send via the Data-Bus.
|
||||
*
|
||||
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
|
||||
@@ -34,7 +34,6 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* The Data Bus pattern.
|
||||
*
|
||||
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||
* @see <a href="http://wiki.c2.com/?DataBusPattern">http://wiki.c2.com/?DataBusPattern</a>
|
||||
* <p>The Data-Bus pattern provides a method where different parts of an application may
|
||||
* pass messages between each other without needing to be aware of the other's existence.</p>
|
||||
|
||||
@@ -32,7 +32,6 @@ import java.util.Set;
|
||||
*
|
||||
* <p>This implementation uses a Singleton.</p>
|
||||
*
|
||||
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||
*/
|
||||
public class DataBus {
|
||||
|
||||
|
||||
@@ -51,7 +51,6 @@ package com.iluwatar.databus;
|
||||
/**
|
||||
* Events are sent via the Data-Bus.
|
||||
*
|
||||
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||
*/
|
||||
|
||||
public interface DataType {
|
||||
|
||||
@@ -53,7 +53,6 @@ import java.util.function.Consumer;
|
||||
/**
|
||||
* Members receive events from the Data-Bus.
|
||||
*
|
||||
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||
*/
|
||||
public interface Member extends Consumer<DataType> {
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ import lombok.Getter;
|
||||
/**
|
||||
* An event raised when a string message is sent.
|
||||
*
|
||||
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -33,7 +33,6 @@ import lombok.RequiredArgsConstructor;
|
||||
/**
|
||||
* An event raised when applications starts, containing the start time of the application.
|
||||
*
|
||||
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -33,7 +33,6 @@ import lombok.RequiredArgsConstructor;
|
||||
/**
|
||||
* An event raised when applications stops, containing the stop time of the application.
|
||||
*
|
||||
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
|
||||
@@ -34,7 +34,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
/**
|
||||
* Receiver of Data-Bus events that collects the messages from each {@link MessageData}.
|
||||
*
|
||||
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||
*/
|
||||
@Slf4j
|
||||
public class MessageCollectorMember implements Member {
|
||||
|
||||
@@ -37,7 +37,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
/**
|
||||
* Receiver of Data-Bus events.
|
||||
*
|
||||
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||
*/
|
||||
@Getter
|
||||
@Slf4j
|
||||
|
||||
@@ -35,7 +35,6 @@ import org.mockito.MockitoAnnotations;
|
||||
/**
|
||||
* Tests for {@link DataBus}.
|
||||
*
|
||||
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||
*/
|
||||
class DataBusTest {
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ import org.junit.jupiter.api.Test;
|
||||
/**
|
||||
* Tests for {@link MessageCollectorMember}.
|
||||
*
|
||||
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||
*/
|
||||
class MessageCollectorMemberTest {
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@ import org.junit.jupiter.api.Test;
|
||||
/**
|
||||
* Tests for {@link StatusMember}.
|
||||
*
|
||||
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||
*/
|
||||
class StatusMemberTest {
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ import java.io.Serial;
|
||||
* Using Runtime Exception for avoiding dependency on implementation exceptions. This helps in
|
||||
* decoupling.
|
||||
*
|
||||
* @author amit.dixit
|
||||
*/
|
||||
public final class DataMapperException extends RuntimeException {
|
||||
|
||||
|
||||
+1
-2
@@ -34,9 +34,8 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Date: 28/04/17 - 7:40 AM
|
||||
* AdvancedSorceressTest
|
||||
*
|
||||
* @author Stanislav Kapinus
|
||||
*/
|
||||
|
||||
class AdvancedSorceressTest {
|
||||
|
||||
+1
-2
@@ -34,9 +34,8 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Date: 12/10/15 - 8:40 PM
|
||||
* AdvancedWizardTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class AdvancedWizardTest {
|
||||
|
||||
|
||||
+1
-2
@@ -35,9 +35,8 @@ import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/10/15 - 8:57 PM
|
||||
* GuiceWizardTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class GuiceWizardTest {
|
||||
|
||||
|
||||
+1
-2
@@ -32,9 +32,8 @@ import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/10/15 - 8:26 PM
|
||||
* SimpleWizardTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class SimpleWizardTest {
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
/**
|
||||
* A mock database manager -- Fetches data from a raw file.
|
||||
*
|
||||
* @author swaisuan
|
||||
*/
|
||||
@Slf4j
|
||||
public class DataFetcher {
|
||||
|
||||
@@ -30,7 +30,6 @@ import java.util.List;
|
||||
/**
|
||||
* A middle-layer app that calls/passes along data from the back-end.
|
||||
*
|
||||
* @author swaisuan
|
||||
*/
|
||||
public class World {
|
||||
|
||||
|
||||
+1
-2
@@ -44,9 +44,8 @@ import org.junit.jupiter.api.Test;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Date: 12/10/15 - 9:34 PM
|
||||
* InventoryTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class InventoryTest {
|
||||
|
||||
|
||||
@@ -29,10 +29,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Date: 12/10/15 - 8:37 PM Test for Collision
|
||||
* CollisionTest
|
||||
*
|
||||
* @param <O> Type of GameObject
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
public abstract class CollisionTest<O extends GameObject> {
|
||||
|
||||
|
||||
@@ -31,9 +31,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/10/15 - 11:31 PM
|
||||
* FlamingAsteroidTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class FlamingAsteroidTest extends CollisionTest<FlamingAsteroid> {
|
||||
|
||||
|
||||
@@ -30,9 +30,8 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/10/15 - 11:31 PM
|
||||
* MeteoroidTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class MeteoroidTest extends CollisionTest<Meteoroid> {
|
||||
|
||||
|
||||
@@ -30,9 +30,8 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/10/15 - 11:31 PM
|
||||
* SpaceStationIssTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class SpaceStationIssTest extends CollisionTest<SpaceStationIss> {
|
||||
|
||||
|
||||
@@ -30,9 +30,8 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/10/15 - 11:31 PM
|
||||
* SpaceStationMirTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class SpaceStationMirTest extends CollisionTest<SpaceStationMir> {
|
||||
|
||||
|
||||
@@ -36,10 +36,9 @@ import java.util.function.Supplier;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 10:58 PM Tests for Event Emitter
|
||||
* Tests for Event Emitter
|
||||
*
|
||||
* @param <E> Type of Event Emitter
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
abstract class EventEmitterTest<E extends EventEmitter> {
|
||||
|
||||
|
||||
@@ -31,9 +31,8 @@ import java.util.Arrays;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 2:52 PM
|
||||
* EventTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class EventTest {
|
||||
|
||||
|
||||
@@ -38,9 +38,8 @@ import org.junit.jupiter.api.Test;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 3:04 PM
|
||||
* KingJoffreyTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class KingJoffreyTest {
|
||||
|
||||
|
||||
@@ -34,9 +34,8 @@ import java.util.Arrays;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 10:57 AM
|
||||
* KingsHandTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class KingsHandTest extends EventEmitterTest<KingsHand> {
|
||||
|
||||
|
||||
@@ -25,9 +25,8 @@
|
||||
package com.iluwatar.event.aggregator;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 10:57 AM
|
||||
* LordBaelishTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class LordBaelishTest extends EventEmitterTest<LordBaelish> {
|
||||
|
||||
|
||||
@@ -25,9 +25,8 @@
|
||||
package com.iluwatar.event.aggregator;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 10:57 AM
|
||||
* LordVarysTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class LordVarysTest extends EventEmitterTest<LordVarys> {
|
||||
|
||||
|
||||
@@ -25,9 +25,8 @@
|
||||
package com.iluwatar.event.aggregator;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 10:57 AM
|
||||
* ScoutTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class ScoutTest extends EventEmitterTest<Scout> {
|
||||
|
||||
|
||||
@@ -31,9 +31,8 @@ import java.util.Arrays;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 2:12 PM
|
||||
* WeekdayTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class WeekdayTest {
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
/**
|
||||
* This class implements the Event Queue pattern.
|
||||
*
|
||||
* @author mkuprivecz
|
||||
*/
|
||||
@Slf4j
|
||||
public class Audio {
|
||||
|
||||
@@ -32,7 +32,6 @@ import lombok.Setter;
|
||||
/**
|
||||
* The Event Queue's queue will store the instances of this class.
|
||||
*
|
||||
* @author mkuprivecz
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -35,7 +35,6 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Testing the Audio service of the Queue
|
||||
* @author mkuprivecz
|
||||
*
|
||||
*/
|
||||
class AudioTest {
|
||||
|
||||
@@ -39,9 +39,8 @@ import org.junit.jupiter.migrationsupport.rules.EnableRuleMigrationSupport;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 3:21 PM
|
||||
* SimpleFileWriterTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
@EnableRuleMigrationSupport
|
||||
class SimpleFileWriterTest {
|
||||
|
||||
@@ -38,9 +38,8 @@ import org.junit.jupiter.api.Test;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Date: 12/9/15 - 9:40 PM
|
||||
* DwarvenGoldmineFacadeTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class DwarvenGoldmineFacadeTest {
|
||||
|
||||
|
||||
+1
-2
@@ -39,9 +39,8 @@ import java.util.function.Consumer;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 7:00 PM
|
||||
* FluentIterableTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
public abstract class FluentIterableTest {
|
||||
|
||||
|
||||
+1
-2
@@ -28,9 +28,8 @@ import com.iluwatar.fluentinterface.fluentiterable.FluentIterable;
|
||||
import com.iluwatar.fluentinterface.fluentiterable.FluentIterableTest;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 7:56 PM
|
||||
* LazyFluentIterableTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class LazyFluentIterableTest extends FluentIterableTest {
|
||||
|
||||
|
||||
+1
-2
@@ -28,9 +28,8 @@ import com.iluwatar.fluentinterface.fluentiterable.FluentIterable;
|
||||
import com.iluwatar.fluentinterface.fluentiterable.FluentIterableTest;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 7:56 PM
|
||||
* SimpleFluentIterableTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class SimpleFluentIterableTest extends FluentIterableTest {
|
||||
|
||||
|
||||
@@ -30,9 +30,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 10:11 PM
|
||||
* ContentTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class ContentTest {
|
||||
|
||||
|
||||
@@ -30,9 +30,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 10:15 PM
|
||||
* MenuItemTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class MenuItemTest {
|
||||
|
||||
|
||||
@@ -44,9 +44,8 @@ import org.junit.jupiter.api.Test;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 8:22 PM
|
||||
* DispatcherTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class DispatcherTest {
|
||||
|
||||
|
||||
@@ -39,9 +39,8 @@ import com.iluwatar.flux.view.View;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 10:18 PM
|
||||
* ContentStoreTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class ContentStoreTest {
|
||||
|
||||
|
||||
@@ -39,9 +39,8 @@ import com.iluwatar.flux.view.View;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 10:18 PM
|
||||
* MenuStoreTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class MenuStoreTest {
|
||||
|
||||
|
||||
@@ -35,9 +35,8 @@ import com.iluwatar.flux.store.ContentStore;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 10:31 PM
|
||||
* ContentViewTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class ContentViewTest {
|
||||
|
||||
|
||||
@@ -39,9 +39,8 @@ import com.iluwatar.flux.store.Store;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 10:31 PM
|
||||
* MenuViewTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class MenuViewTest {
|
||||
|
||||
|
||||
@@ -32,9 +32,8 @@ import java.util.HashSet;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 10:54 PM
|
||||
* AlchemistShopTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class AlchemistShopTest {
|
||||
|
||||
|
||||
+1
-2
@@ -29,9 +29,8 @@ import static org.junit.jupiter.api.Assertions.assertSame;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/13/15 - 1:35 PM
|
||||
* ApplicationExceptionTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class ApplicationExceptionTest {
|
||||
|
||||
|
||||
@@ -34,9 +34,8 @@ import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
|
||||
/**
|
||||
* Date: 12/13/15 - 1:39 PM
|
||||
* CommandTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class CommandTest {
|
||||
|
||||
|
||||
+1
-2
@@ -34,9 +34,8 @@ import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
|
||||
/**
|
||||
* Date: 12/13/15 - 1:39 PM
|
||||
* FrontControllerTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class FrontControllerTest {
|
||||
|
||||
|
||||
@@ -34,9 +34,8 @@ import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
|
||||
/**
|
||||
* Date: 12/13/15 - 1:39 PM
|
||||
* ViewTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class ViewTest {
|
||||
|
||||
|
||||
+1
-2
@@ -40,9 +40,8 @@ import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/12/15 - 11:15 PM
|
||||
* AsynchronousServiceTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class AsynchronousServiceTest {
|
||||
private AsynchronousService service;
|
||||
|
||||
@@ -37,7 +37,6 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
* microservice architectures, please refer to: [Microservices Health Checks
|
||||
* API]('https://microservices.io/patterns/observability/health-check-api.html').
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
@EnableCaching
|
||||
@EnableScheduling
|
||||
|
||||
@@ -40,7 +40,6 @@ import org.springframework.stereotype.Component;
|
||||
/**
|
||||
* An asynchronous health checker component that executes health checks in a separate thread.
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
|
||||
@@ -41,7 +41,6 @@ import org.springframework.stereotype.Component;
|
||||
/**
|
||||
* A health indicator that checks the health of the system's CPU.
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
|
||||
@@ -41,7 +41,6 @@ import org.springframework.stereotype.Component;
|
||||
* A custom health indicator that periodically checks the health of a database and caches the
|
||||
* result. It leverages an asynchronous health checker to perform the health checks.
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
|
||||
-1
@@ -42,7 +42,6 @@ import org.springframework.stereotype.Component;
|
||||
* the health indicator returns {@link Health#up()} and logs a success message. If all retry
|
||||
* attempts fail, the health indicator returns {@link Health#down()} and logs an error message.
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
|
||||
-1
@@ -45,7 +45,6 @@ import org.springframework.stereotype.Component;
|
||||
* collection time, memory pool name, and garbage collector algorithm for each garbage collector and
|
||||
* presents the details in a structured manner.
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
|
||||
@@ -35,7 +35,6 @@ import lombok.Data;
|
||||
* An entity class that represents a health check record in the database. This class is used to
|
||||
* persist the results of health checks performed by the `DatabaseTransactionHealthIndicator`.
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
@Entity
|
||||
@Data
|
||||
|
||||
@@ -34,7 +34,6 @@ import org.springframework.stereotype.Repository;
|
||||
* A repository class for managing health check records in the database. This class provides methods
|
||||
* for checking the health of the database connection and performing test transactions.
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
@Slf4j
|
||||
@Repository
|
||||
|
||||
@@ -42,7 +42,6 @@ import org.springframework.stereotype.Component;
|
||||
* status accordingly. It uses an asynchronous health checker to perform the health check and a
|
||||
* configurable memory usage threshold to determine the health status.
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
|
||||
@@ -35,7 +35,6 @@ import org.springframework.stereotype.Component;
|
||||
/**
|
||||
* Configuration class for retry policies used in health check operations.
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
@Configuration
|
||||
@Component
|
||||
|
||||
@@ -48,7 +48,6 @@ import org.springframework.boot.actuate.health.Status;
|
||||
/**
|
||||
* Tests for {@link AsynchronousHealthChecker}.
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
@Slf4j
|
||||
class AsynchronousHealthCheckerTest {
|
||||
|
||||
@@ -37,7 +37,6 @@ import org.springframework.boot.actuate.health.Status;
|
||||
/**
|
||||
* Test class for the {@link CpuHealthIndicator} class.
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
class CpuHealthIndicatorTest {
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@ import org.springframework.context.annotation.Configuration;
|
||||
/**
|
||||
* Tests class< for {@link CustomHealthIndicator}. *
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
class CustomHealthIndicatorTest {
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@ import org.springframework.retry.support.RetryTemplate;
|
||||
/**
|
||||
* Unit tests for the {@link DatabaseTransactionHealthIndicator} class.
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
class DatabaseTransactionHealthIndicatorTest {
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@ import org.springframework.boot.actuate.health.Status;
|
||||
/**
|
||||
* Test class for {@link GarbageCollectionHealthIndicator}.
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
class GarbageCollectionHealthIndicatorTest {
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@ import org.mockito.junit.jupiter.MockitoExtension;
|
||||
/**
|
||||
* Tests class for {@link HealthCheckRepository}.
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
class HealthCheckRepositoryTest {
|
||||
|
||||
@@ -49,7 +49,6 @@ import org.springframework.http.HttpStatus;
|
||||
* "availableProcessors":2,"systemCpuLoad":"100.00%","loadAverage":1.97,"timestamp":"2023-11-09T08:34:15.974557865Z",
|
||||
* * "error":"High system CPU load"}}} *
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
@Slf4j
|
||||
@SpringBootTest(
|
||||
|
||||
@@ -44,7 +44,6 @@ import org.springframework.boot.actuate.health.Status;
|
||||
/**
|
||||
* Unit tests for {@link MemoryHealthIndicator}.
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
class MemoryHealthIndicatorTest {
|
||||
|
||||
@@ -35,7 +35,6 @@ import org.springframework.retry.support.RetryTemplate;
|
||||
/**
|
||||
* Unit tests for the {@link RetryConfig} class.
|
||||
*
|
||||
* @author ydoksanbir
|
||||
*/
|
||||
@SpringBootTest(classes = RetryConfig.class)
|
||||
class RetryConfigTest {
|
||||
|
||||
@@ -28,7 +28,6 @@ package com.iluwatar.intercepting.filter;
|
||||
* Concrete implementation of filter This filter is responsible for checking/filtering the input in
|
||||
* the address field.
|
||||
*
|
||||
* @author joshzambales
|
||||
*/
|
||||
public class AddressFilter extends AbstractFilter {
|
||||
|
||||
|
||||
@@ -45,7 +45,6 @@ package com.iluwatar.intercepting.filter;
|
||||
* <p>In this example we check whether the order request is valid through pre-processing done via
|
||||
* {@link Filter}. Each field has its own corresponding {@link Filter}.
|
||||
*
|
||||
* @author joshzambales
|
||||
*/
|
||||
public class App {
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@ import javax.swing.WindowConstants;
|
||||
* <p>This is where {@link Filter}s come to play as the client pre-processes the request before
|
||||
* being displayed in the {@link Target}.
|
||||
*
|
||||
* @author joshzambales
|
||||
*/
|
||||
public class Client extends JFrame { // NOSONAR
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ package com.iluwatar.intercepting.filter;
|
||||
* the input consist of numbers and it also checks if the input follows the length constraint (11
|
||||
* digits).
|
||||
*
|
||||
* @author joshzambales
|
||||
*/
|
||||
public class ContactFilter extends AbstractFilter {
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ package com.iluwatar.intercepting.filter;
|
||||
/**
|
||||
* Concrete implementation of filter This checks for the deposit code.
|
||||
*
|
||||
* @author joshzambales
|
||||
*/
|
||||
public class DepositFilter extends AbstractFilter {
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ package com.iluwatar.intercepting.filter;
|
||||
* Filters perform certain tasks prior or after execution of request by request handler. In this
|
||||
* case, before the request is handled by the target, the request undergoes through each Filter
|
||||
*
|
||||
* @author joshzambales
|
||||
*/
|
||||
public interface Filter {
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ package com.iluwatar.intercepting.filter;
|
||||
/**
|
||||
* Filter Chain carries multiple filters and help to execute them in defined order on target.
|
||||
*
|
||||
* @author joshzambales
|
||||
*/
|
||||
public class FilterChain {
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ package com.iluwatar.intercepting.filter;
|
||||
/**
|
||||
* Filter Manager manages the filters and {@link FilterChain}.
|
||||
*
|
||||
* @author joshzambales
|
||||
*/
|
||||
public class FilterManager {
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ package com.iluwatar.intercepting.filter;
|
||||
* Concrete implementation of filter. This filter checks if the input in the Name field is valid.
|
||||
* (alphanumeric)
|
||||
*
|
||||
* @author joshzambales
|
||||
*/
|
||||
public class NameFilter extends AbstractFilter {
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ package com.iluwatar.intercepting.filter;
|
||||
/**
|
||||
* Concrete implementation of filter. This checks for the order field.
|
||||
*
|
||||
* @author joshzambales
|
||||
*/
|
||||
public class OrderFilter extends AbstractFilter {
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@ import javax.swing.table.DefaultTableModel;
|
||||
/**
|
||||
* This is where the requests are displayed after being validated by filters.
|
||||
*
|
||||
* @author mjoshzambales
|
||||
*/
|
||||
public class Target extends JFrame { //NOSONAR
|
||||
|
||||
|
||||
+1
-2
@@ -35,9 +35,8 @@ import static org.mockito.Mockito.when;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/13/15 - 3:01 PM
|
||||
* FilterManagerTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class FilterManagerTest {
|
||||
|
||||
|
||||
@@ -34,9 +34,8 @@ import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
|
||||
/**
|
||||
* Date: 12/13/15 - 2:17 PM
|
||||
* FilterTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class FilterTest {
|
||||
|
||||
|
||||
@@ -29,9 +29,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 12/13/15 - 2:57 PM
|
||||
* OrderTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class OrderTest {
|
||||
|
||||
|
||||
@@ -30,9 +30,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Date: 01/29/23 - 1:33 PM
|
||||
* TargetTest
|
||||
*
|
||||
* @author Rahul Raj
|
||||
*/
|
||||
class TargetTest {
|
||||
|
||||
|
||||
@@ -37,12 +37,9 @@ import org.junit.jupiter.params.provider.Arguments;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
|
||||
/**
|
||||
* Date: 12/14/15 - 11:48 AM
|
||||
* <p>
|
||||
* Test Case for Expressions
|
||||
*
|
||||
* @param <E> Type of Expression
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
|
||||
public abstract class ExpressionTest<E extends Expression> {
|
||||
|
||||
@@ -28,9 +28,8 @@ import java.util.stream.Stream;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
|
||||
/**
|
||||
* Date: 12/14/15 - 12:08 PM
|
||||
* MinusExpressionTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class MinusExpressionTest extends ExpressionTest<MinusExpression> {
|
||||
|
||||
|
||||
@@ -28,9 +28,8 @@ import java.util.stream.Stream;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
|
||||
/**
|
||||
* Date: 12/14/15 - 12:08 PM
|
||||
* MultiplyExpressionTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class MultiplyExpressionTest extends ExpressionTest<MultiplyExpression> {
|
||||
|
||||
|
||||
@@ -32,9 +32,8 @@ import org.junit.jupiter.params.provider.Arguments;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
|
||||
/**
|
||||
* Date: 12/14/15 - 12:08 PM
|
||||
* NumberExpressionTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class NumberExpressionTest extends ExpressionTest<NumberExpression> {
|
||||
|
||||
|
||||
@@ -28,9 +28,8 @@ import java.util.stream.Stream;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
|
||||
/**
|
||||
* Date: 12/14/15 - 12:08 PM
|
||||
* PlusExpressionTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class PlusExpressionTest extends ExpressionTest<PlusExpression> {
|
||||
|
||||
|
||||
@@ -33,9 +33,8 @@ import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
|
||||
/**
|
||||
* Date: 12/14/15 - 2:58 PM
|
||||
* TreasureChestTest
|
||||
*
|
||||
* @author Jeroen Meulemeester
|
||||
*/
|
||||
class TreasureChestTest {
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user