mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-24 10:25:17 +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:
+7
-10
@@ -24,13 +24,11 @@
|
||||
*/
|
||||
package com.iluwatar.partialresponse;
|
||||
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* tests {@link FieldJsonMapper}.
|
||||
*/
|
||||
/** tests {@link FieldJsonMapper}. */
|
||||
class FieldJsonMapperTest {
|
||||
private static FieldJsonMapper mapper;
|
||||
|
||||
@@ -41,15 +39,14 @@ class FieldJsonMapperTest {
|
||||
|
||||
@Test
|
||||
void shouldReturnJsonForSpecifiedFieldsInVideo() throws Exception {
|
||||
var fields = new String[]{"id", "title", "length"};
|
||||
var video = new Video(
|
||||
2, "Godzilla Resurgence", 120,
|
||||
"Action & drama movie|", "Hideaki Anno", "Japanese"
|
||||
);
|
||||
var fields = new String[] {"id", "title", "length"};
|
||||
var video =
|
||||
new Video(
|
||||
2, "Godzilla Resurgence", 120, "Action & drama movie|", "Hideaki Anno", "Japanese");
|
||||
|
||||
var jsonFieldResponse = mapper.toJson(video, fields);
|
||||
|
||||
var expectedDetails = "{\"id\": 2,\"title\": \"Godzilla Resurgence\",\"length\": 120}";
|
||||
Assertions.assertEquals(expectedDetails, jsonFieldResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user