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