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:
Ilkka Seppälä authored and GitHub committed 2025-03-29 19:34:27 +02:00
1 parent 371439aeaa
commit 0ca162a55c
1863 files changed
+14403 -17632

No files matched your search

@@ -24,35 +24,35 @@
*/
package com.iluwatar.presentationmodel;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
class AlbumTest {
@Test
void testSetTitle(){
void testSetTitle() {
Album album = new Album("a", "b", false, "");
album.setTitle("b");
assertEquals("b", album.getTitle());
}
@Test
void testSetArtist(){
void testSetArtist() {
Album album = new Album("a", "b", false, "");
album.setArtist("c");
assertEquals("c", album.getArtist());
}
@Test
void testSetClassical(){
void testSetClassical() {
Album album = new Album("a", "b", false, "");
album.setClassical(true);
assertTrue(album.isClassical());
}
@Test
void testSetComposer(){
void testSetComposer() {
Album album = new Album("a", "b", false, "");
album.setClassical(true);
album.setComposer("w");
@@ -24,20 +24,20 @@
*/
package com.iluwatar.presentationmodel;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import org.junit.jupiter.api.Test;
/**
* Issue: Add at least one assertion to this test case.
*
* Solution: Inserted assertion to check whether the execution of the main method in {@link App}
* <p>Solution: Inserted assertion to check whether the execution of the main method in {@link App}
* throws an exception.
*/
class AppTest {
@Test
void shouldExecuteApplicationWithoutException() {
assertDoesNotThrow(() -> App.main(new String[]{}));
}
@Test
void shouldExecuteApplicationWithoutException() {
assertDoesNotThrow(() -> App.main(new String[] {}));
}
}
@@ -24,21 +24,20 @@
*/
package com.iluwatar.presentationmodel;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
class DisplayedAlbumsTest {
@Test
void testAdd_true(){
void testAdd_true() {
DisplayedAlbums displayedAlbums = new DisplayedAlbums();
displayedAlbums.addAlbums("title", "artist", true, "composer");
assertEquals("composer", displayedAlbums.getAlbums().get(0).getComposer());
}
@Test
void testAdd_false(){
void testAdd_false() {
DisplayedAlbums displayedAlbums = new DisplayedAlbums();
displayedAlbums.addAlbums("title", "artist", false, "composer");
assertEquals("", displayedAlbums.getAlbums().get(0).getComposer());
@@ -24,15 +24,16 @@
*/
package com.iluwatar.presentationmodel;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.Arrays;
import org.junit.jupiter.api.Test;
class PresentationTest {
String[] albumList = {"HQ", "The Rough Dancer and Cyclical Night", "The Black Light", "Symphony No.5"};
String[] albumList = {
"HQ", "The Rough Dancer and Cyclical Night", "The Black Light", "Symphony No.5"
};
@Test
void testCreateAlbumList() {
@@ -24,15 +24,18 @@
*/
package com.iluwatar.presentationmodel;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test;
class ViewTest {
String[] albumList = {"HQ", "The Rough Dancer and Cyclical Night", "The Black Light", "Symphony No.5"};
String[] albumList = {
"HQ", "The Rough Dancer and Cyclical Night", "The Black Light", "Symphony No.5"
};
@Test
void testSave_setArtistAndTitle(){
void testSave_setArtistAndTitle() {
View view = new View();
view.createView();
String testTitle = "testTitle";
@@ -46,7 +49,7 @@ class ViewTest {
}
@Test
void testSave_setClassicalAndComposer(){
void testSave_setClassicalAndComposer() {
View view = new View();
view.createView();
boolean isClassical = true;
@@ -60,7 +63,7 @@ class ViewTest {
}
@Test
void testLoad_1(){
void testLoad_1() {
View view = new View();
view.createView();
view.getModel().setSelectedAlbumNumber(2);
@@ -69,7 +72,7 @@ class ViewTest {
}
@Test
void testLoad_2(){
void testLoad_2() {
View view = new View();
view.createView();
view.getModel().setSelectedAlbumNumber(4);