use of com.google.gerrit.server.events.RefUpdatedEvent in project gerrit by GerritCodeReview.
the class EventRecorder method assertRefUpdatedEvents.
public void assertRefUpdatedEvents(String project, String branch, String... expected) throws Exception {
ImmutableList<RefUpdatedEvent> events = getRefUpdatedEvents(project, branch, expected.length / 2);
int i = 0;
for (RefUpdatedEvent event : events) {
RefUpdateAttribute actual = event.refUpdate.get();
String oldRev = expected[i] == null ? ObjectId.zeroId().name() : expected[i];
String newRev = expected[i + 1] == null ? ObjectId.zeroId().name() : expected[i + 1];
assertThat(actual.oldRev).isEqualTo(oldRev);
assertThat(actual.newRev).isEqualTo(newRev);
i += 2;
}
}
use of com.google.gerrit.server.events.RefUpdatedEvent in project gerrit by GerritCodeReview.
the class EventRecorder method assertRefUpdatedEvents.
public void assertRefUpdatedEvents(String project, String branch, RevCommit... expected) throws Exception {
ImmutableList<RefUpdatedEvent> events = getRefUpdatedEvents(project, branch, expected.length / 2);
int i = 0;
for (RefUpdatedEvent event : events) {
RefUpdateAttribute actual = event.refUpdate.get();
String oldRev = expected[i] == null ? ObjectId.zeroId().name() : expected[i].name();
String newRev = expected[i + 1] == null ? ObjectId.zeroId().name() : expected[i + 1].name();
assertThat(actual.oldRev).isEqualTo(oldRev);
assertThat(actual.newRev).isEqualTo(newRev);
i += 2;
}
}
Aggregations