#631 - Partial Response : Add missing length in video details
This commit is contained in:
parent
a0c081f5ea
commit
d0ad0f7ea9
@ -58,6 +58,7 @@ public class Video {
|
|||||||
return "{" +
|
return "{" +
|
||||||
"\"id\": \"" + id + "\"," +
|
"\"id\": \"" + id + "\"," +
|
||||||
"\"title\": \"" + title + "\"," +
|
"\"title\": \"" + title + "\"," +
|
||||||
|
"\"length\": " + length + "," +
|
||||||
"\"description\": \"" + description + "\"," +
|
"\"description\": \"" + description + "\"," +
|
||||||
"\"director\": \"" + director + "\"," +
|
"\"director\": \"" + director + "\"," +
|
||||||
"\"language\": \"" + language + "\"," +
|
"\"language\": \"" + language + "\"," +
|
||||||
|
@ -48,7 +48,7 @@ public class VideoResourceTest {
|
|||||||
public void shouldGiveVideoDetailsById() {
|
public void shouldGiveVideoDetailsById() {
|
||||||
String details = resource.getDetails(1);
|
String details = resource.getDetails(1);
|
||||||
|
|
||||||
String expectedDetails = "{\"id\": \"1\",\"title\": \"Avatar\",\"description\": \"epic science fiction film\",\"director\": \"James Cameron\",\"language\": \"English\",}";
|
String expectedDetails = "{\"id\": \"1\",\"title\": \"Avatar\",\"length\": 178,\"description\": \"epic science fiction film\",\"director\": \"James Cameron\",\"language\": \"English\",}";
|
||||||
assertEquals(details, expectedDetails);
|
assertEquals(expectedDetails, details);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user