use of com.google.gerrit.extensions.api.changes.SubmittedTogetherInfo in project gerrit by GerritCodeReview.
the class SubmittedTogetherIT method doesNotIncludeCurrentFiles.
@Test
public void doesNotIncludeCurrentFiles() throws Exception {
RevCommit c1_1 = commitBuilder().add("a.txt", "1").message("subject: 1").create();
RevCommit c2_1 = commitBuilder().add("b.txt", "2").message("subject: 2").create();
String id2 = getChangeId(c2_1);
pushHead(testRepo, "refs/for/master", false);
SubmittedTogetherInfo info = gApi.changes().id(id2).submittedTogether(EnumSet.of(NON_VISIBLE_CHANGES));
assertThat(info.changes).hasSize(2);
assertThat(info.changes.get(0).currentRevision).isEqualTo(c2_1.name());
assertThat(info.changes.get(1).currentRevision).isEqualTo(c1_1.name());
assertThat(info.changes.get(0).currentRevision).isEqualTo(c2_1.name());
RevisionInfo rev = info.changes.get(0).revisions.get(c2_1.name());
assertThat(rev.files).isNull();
}
Aggregations