#631 - Partial Response : Add missing length in video details

This commit is contained in:
Gopinath Langote 2017-09-14 19:35:52 +05:30
parent a0c081f5ea
commit d0ad0f7ea9
2 changed files with 3 additions and 2 deletions

View File

@ -58,6 +58,7 @@ public class Video {
return "{" +
"\"id\": \"" + id + "\"," +
"\"title\": \"" + title + "\"," +
"\"length\": " + length + "," +
"\"description\": \"" + description + "\"," +
"\"director\": \"" + director + "\"," +
"\"language\": \"" + language + "\"," +

View File

@ -48,7 +48,7 @@ public class VideoResourceTest {
public void shouldGiveVideoDetailsById() {
String details = resource.getDetails(1);
String expectedDetails = "{\"id\": \"1\",\"title\": \"Avatar\",\"description\": \"epic science fiction film\",\"director\": \"James Cameron\",\"language\": \"English\",}";
assertEquals(details, expectedDetails);
String expectedDetails = "{\"id\": \"1\",\"title\": \"Avatar\",\"length\": 178,\"description\": \"epic science fiction film\",\"director\": \"James Cameron\",\"language\": \"English\",}";
assertEquals(expectedDetails, details);
}
}