Java 11 migrate remaining p (#1122)
* Moves partial-response to Java 11 * Moves pipeline to Java 11 * Moves poison-pill to Java 11 * Moves priority-queue to Java 11 * Moves private-class-data to Java 11 * Moves producer-consumer to Java 11 * Moves promise to Java 11 * Moves property to Java 11 * Moves prototype to Java 11 * Moves proxy to Java 11 * Corrects checkstyle errors * Fixes build for pipeline pattern
This commit is contained in:
committed by
Ilkka Seppälä
parent
1401accb4f
commit
428efc7d53
@@ -23,11 +23,11 @@
|
||||
|
||||
package com.iluwatar.partialresponse;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
/**
|
||||
* tests {@link FieldJsonMapper}.
|
||||
*/
|
||||
@@ -41,12 +41,15 @@ public class FieldJsonMapperTest {
|
||||
|
||||
@Test
|
||||
public void shouldReturnJsonForSpecifiedFieldsInVideo() throws Exception {
|
||||
String[] fields = new String[]{"id", "title", "length"};
|
||||
Video 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"
|
||||
);
|
||||
|
||||
String jsonFieldResponse = mapper.toJson(video, fields);
|
||||
var jsonFieldResponse = mapper.toJson(video, fields);
|
||||
|
||||
String expectedDetails = "{\"id\": 2,\"title\": \"Godzilla Resurgence\",\"length\": 120}";
|
||||
var expectedDetails = "{\"id\": 2,\"title\": \"Godzilla Resurgence\",\"length\": 120}";
|
||||
assertEquals(expectedDetails, jsonFieldResponse);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user