mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-08-09 18:25:59 +00:00
deps: Refactor dependencies (#3224)
* remove spring dep move junit, logging, mockito under dep mgmt * upgrade anti-corruption-layer deps * async method invocation * balking, bloc * bridge to bytecode * caching * callback - cqrs * component - health check * hexagonal - metadata mapping * rest of the patterns * remove checkstyle, take spotless into use
This commit is contained in:
@@ -35,8 +35,7 @@ public final class Nazgul {
|
||||
|
||||
private static final Map<NazgulName, Nazgul> nazguls;
|
||||
|
||||
@Getter
|
||||
private final NazgulName name;
|
||||
@Getter private final NazgulName name;
|
||||
|
||||
static {
|
||||
nazguls = new ConcurrentHashMap<>();
|
||||
|
||||
@@ -24,9 +24,7 @@
|
||||
*/
|
||||
package com.iluwatar.multiton;
|
||||
|
||||
/**
|
||||
* enum based multiton implementation.
|
||||
*/
|
||||
/** enum based multiton implementation. */
|
||||
public enum NazgulEnum {
|
||||
KHAMUL,
|
||||
MURAZOR,
|
||||
|
||||
@@ -24,9 +24,7 @@
|
||||
*/
|
||||
package com.iluwatar.multiton;
|
||||
|
||||
/**
|
||||
* Each Nazgul has different {@link NazgulName}.
|
||||
*/
|
||||
/** Each Nazgul has different {@link NazgulName}. */
|
||||
public enum NazgulName {
|
||||
KHAMUL,
|
||||
MURAZOR,
|
||||
|
||||
@@ -28,14 +28,11 @@ import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Test if the application starts without throwing an exception.
|
||||
*/
|
||||
|
||||
/** Test if the application starts without throwing an exception. */
|
||||
class AppTest {
|
||||
|
||||
@Test
|
||||
void shouldExecuteApplicationWithoutException() {
|
||||
assertDoesNotThrow(() -> App.main(new String[]{}));
|
||||
assertDoesNotThrow(() -> App.main(new String[] {}));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,15 +29,12 @@ import static org.junit.jupiter.api.Assertions.assertSame;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.EnumSource;
|
||||
|
||||
/**
|
||||
* NazgulEnumTest
|
||||
*
|
||||
*/
|
||||
/** NazgulEnumTest */
|
||||
class NazgulEnumTest {
|
||||
|
||||
/**
|
||||
* Check that multiple calls to any one of the instances in the multiton returns
|
||||
* only that one particular instance, and do that for all instances in multiton
|
||||
* Check that multiple calls to any one of the instances in the multiton returns only that one
|
||||
* particular instance, and do that for all instances in multiton
|
||||
*/
|
||||
@ParameterizedTest
|
||||
@EnumSource
|
||||
|
||||
@@ -30,10 +30,7 @@ import static org.junit.jupiter.api.Assertions.assertSame;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* NazgulTest
|
||||
*
|
||||
*/
|
||||
/** NazgulTest */
|
||||
class NazgulTest {
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user