Merge branch 'stable-2.16' into stable-3.0
* stable-2.16: Fix assertions to use isEmpty() rather than hasSize(0) Change-Id: I5bf30bb3090f649a7ccd6a61518cdf09f16fa980
This commit is contained in:
@@ -1759,7 +1759,7 @@ public class ChangeIT extends AbstractDaemonTest {
|
||||
// Added reviewers not notified by default.
|
||||
PushOneCommit.Result r = createWorkInProgressChange();
|
||||
gApi.changes().id(r.getChangeId()).addReviewer(in);
|
||||
assertThat(sender.getMessages()).hasSize(0);
|
||||
assertThat(sender.getMessages()).isEmpty();
|
||||
|
||||
// Default notification handling can be overridden.
|
||||
r = createWorkInProgressChange();
|
||||
@@ -1773,7 +1773,7 @@ public class ChangeIT extends AbstractDaemonTest {
|
||||
// that should be ignored.
|
||||
r = createWorkInProgressChange();
|
||||
gApi.changes().id(r.getChangeId()).revision("current").review(batchIn);
|
||||
assertThat(sender.getMessages()).hasSize(0);
|
||||
assertThat(sender.getMessages()).isEmpty();
|
||||
|
||||
// Top-level notify property can force notifications when adding reviewer
|
||||
// via PostReview.
|
||||
|
@@ -746,7 +746,7 @@ public class RevisionIT extends AbstractDaemonTest {
|
||||
input.notify = NotifyHandling.NONE;
|
||||
sender.clear();
|
||||
gApi.changes().id(changeId).current().cherryPick(input);
|
||||
assertThat(sender.getMessages()).hasSize(0);
|
||||
assertThat(sender.getMessages()).isEmpty();
|
||||
|
||||
// Disable the notification. The user provided in the 'notifyDetails' should still be notified.
|
||||
TestAccount userToNotify = accountCreator.user2();
|
||||
|
@@ -878,7 +878,7 @@ public class CommentsIT extends AbstractDaemonTest {
|
||||
// PS2 has comments [c6, c9].
|
||||
assertThat(getRevisionComments(changeId, ps2)).hasSize(2);
|
||||
// PS3 has no comment.
|
||||
assertThat(getRevisionComments(changeId, ps3)).hasSize(0);
|
||||
assertThat(getRevisionComments(changeId, ps3)).isEmpty();
|
||||
// PS4 has comments [c7, c8].
|
||||
assertThat(getRevisionComments(changeId, ps4)).hasSize(2);
|
||||
|
||||
|
@@ -53,7 +53,7 @@ public final class AuditLogReaderTest extends AbstractGroupTest {
|
||||
@Test
|
||||
public void createGroupAsServerIdent() throws Exception {
|
||||
InternalGroup group = createGroup(1, "test-group", serverIdent, null);
|
||||
assertThat(auditLogReader.getMembersAudit(allUsersRepo, group.getGroupUUID())).hasSize(0);
|
||||
assertThat(auditLogReader.getMembersAudit(allUsersRepo, group.getGroupUUID())).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user