use of com.google.gitiles.FileJsonData.File in project gitiles by GerritCodeReview.
the class PathServletTest method fileJson.
@Test
public void fileJson() throws Exception {
RevBlob blob = repo.blob("contents");
repo.branch("master").commit().add("path/to/file", blob).create();
File file = buildJson(File.class, "/repo/+/master/path/to/file");
assertThat(file.id).isEqualTo(blob.name());
assertThat(file.repo).isEqualTo("repo");
assertThat(file.revision).isEqualTo("master");
assertThat(file.path).isEqualTo("path/to/file");
}