Merge "Use simpler isTrue() and isFalse() in tests"
This commit is contained in:
commit
ed72c67d7c
@ -47,7 +47,7 @@ public class DisablePrivateChangesIT extends AbstractDaemonTest {
|
||||
public void createPrivateChangeWithDisablePrivateChangesFalse() throws Exception {
|
||||
ChangeInput input = new ChangeInput(project.get(), "master", "empty change");
|
||||
input.isPrivate = true;
|
||||
assertThat(gApi.changes().create(input).get().isPrivate).isEqualTo(true);
|
||||
assertThat(gApi.changes().create(input).get().isPrivate).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -84,7 +84,7 @@ public class DisablePrivateChangesIT extends AbstractDaemonTest {
|
||||
public void pushPrivatesWithDisablePrivateChangesFalse() throws Exception {
|
||||
PushOneCommit.Result result =
|
||||
pushFactory.create(db, admin.getIdent(), testRepo).to("refs/for/master%private");
|
||||
assertThat(result.getChange().change().isPrivate()).isEqualTo(true);
|
||||
assertThat(result.getChange().change().isPrivate()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -92,11 +92,11 @@ public class DisablePrivateChangesIT extends AbstractDaemonTest {
|
||||
RevCommit initialHead = getRemoteHead();
|
||||
PushOneCommit.Result result =
|
||||
pushFactory.create(db, admin.getIdent(), testRepo).to("refs/for/master%draft");
|
||||
assertThat(result.getChange().change().isPrivate()).isEqualTo(true);
|
||||
assertThat(result.getChange().change().isPrivate()).isTrue();
|
||||
|
||||
testRepo.reset(initialHead);
|
||||
result = pushFactory.create(db, admin.getIdent(), testRepo).to("refs/drafts/master");
|
||||
assertThat(result.getChange().change().isPrivate()).isEqualTo(true);
|
||||
assertThat(result.getChange().change().isPrivate()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -1923,8 +1923,8 @@ public abstract class AbstractPushForReview extends AbstractDaemonTest {
|
||||
|
||||
assertThat(info1.status).isEqualTo(ChangeStatus.NEW);
|
||||
assertThat(info2.status).isEqualTo(ChangeStatus.NEW);
|
||||
assertThat(info1.isPrivate).isEqualTo(true);
|
||||
assertThat(info2.isPrivate).isEqualTo(true);
|
||||
assertThat(info1.isPrivate).isTrue();
|
||||
assertThat(info2.isPrivate).isTrue();
|
||||
assertThat(info1.revisions).hasSize(1);
|
||||
assertThat(info2.revisions).hasSize(1);
|
||||
}
|
||||
|
@ -1159,9 +1159,7 @@ public abstract class AbstractSubmit extends AbstractDaemonTest {
|
||||
}
|
||||
|
||||
protected void assertSubmittable(String changeId) throws Exception {
|
||||
assertThat(get(changeId, SUBMITTABLE).submittable)
|
||||
.named("submit bit on ChangeInfo")
|
||||
.isEqualTo(true);
|
||||
assertThat(get(changeId, SUBMITTABLE).submittable).named("submit bit on ChangeInfo").isTrue();
|
||||
RevisionResource rsrc = parseCurrentRevisionResource(changeId);
|
||||
UiAction.Description desc = submitHandler.getDescription(rsrc);
|
||||
assertThat(desc.isVisible()).named("visible bit on submit action").isTrue();
|
||||
|
@ -46,7 +46,7 @@ public class PrivateByDefaultIT extends AbstractDaemonTest {
|
||||
public void createChangeWithPrivateByDefaultEnabled() throws Exception {
|
||||
setPrivateByDefault(project2, InheritableBoolean.TRUE);
|
||||
ChangeInput input = new ChangeInput(project2.get(), "master", "empty change");
|
||||
assertThat(gApi.changes().create(input).get().isPrivate).isEqualTo(true);
|
||||
assertThat(gApi.changes().create(input).get().isPrivate).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -86,7 +86,7 @@ public class PrivateByDefaultIT extends AbstractDaemonTest {
|
||||
@Test
|
||||
public void pushWithPrivateByDefaultEnabled() throws Exception {
|
||||
setPrivateByDefault(project2, InheritableBoolean.TRUE);
|
||||
assertThat(createChange(project2).getChange().change().isPrivate()).isEqualTo(true);
|
||||
assertThat(createChange(project2).getChange().change().isPrivate()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -97,18 +97,18 @@ public class PrivateByDefaultIT extends AbstractDaemonTest {
|
||||
.getChange()
|
||||
.change()
|
||||
.isPrivate())
|
||||
.isEqualTo(false);
|
||||
.isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void pushWithPrivateByDefaultDisabled() throws Exception {
|
||||
assertThat(createChange(project2).getChange().change().isPrivate()).isEqualTo(false);
|
||||
assertThat(createChange(project2).getChange().change().isPrivate()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void pushBypassPrivateByDefaultInherited() throws Exception {
|
||||
setPrivateByDefault(project1, InheritableBoolean.TRUE);
|
||||
assertThat(createChange(project2).getChange().change().isPrivate()).isEqualTo(true);
|
||||
assertThat(createChange(project2).getChange().change().isPrivate()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -1195,7 +1195,7 @@ public class ChangeRebuilderIT extends AbstractDaemonTest {
|
||||
Map<String, List<CommentInfo>> comments = gApi.changes().id(id.get()).current().drafts();
|
||||
for (List<CommentInfo> cList : comments.values()) {
|
||||
for (CommentInfo ci : cList) {
|
||||
assertThat(ci.unresolved).isEqualTo(true);
|
||||
assertThat(ci.unresolved).isTrue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user