Make method names between TestCheckerUpdate and TestCheckUpdate consistent
TestCheckUpdate.Builder had method names starting with 'set' while the
method in TestCheckerUpdate.Builder omitted the 'set' prefix.
Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: I86552e26328b92970b9aafef2b119e617f5a2cc6
diff --git a/java/com/google/gerrit/plugins/checks/acceptance/testsuite/CheckOperationsImpl.java b/java/com/google/gerrit/plugins/checks/acceptance/testsuite/CheckOperationsImpl.java
index a4d9ce0..a348777 100644
--- a/java/com/google/gerrit/plugins/checks/acceptance/testsuite/CheckOperationsImpl.java
+++ b/java/com/google/gerrit/plugins/checks/acceptance/testsuite/CheckOperationsImpl.java
@@ -66,7 +66,7 @@
@Override
public TestCheckUpdate.Builder newCheck(CheckKey key) {
return TestCheckUpdate.builder(key)
- .setCheckUpdater(u -> checksUpdate.get().createCheck(key, toCheckUpdate(u)));
+ .checkUpdater(u -> checksUpdate.get().createCheck(key, toCheckUpdate(u)));
}
final class PerCheckOperationsImpl implements PerCheckOperations {
@@ -118,7 +118,7 @@
@Override
public TestCheckUpdate.Builder forUpdate() {
return TestCheckUpdate.builder(key)
- .setCheckUpdater(
+ .checkUpdater(
testUpdate -> checksUpdate.get().updateCheck(key, toCheckUpdate(testUpdate)));
}
}
diff --git a/java/com/google/gerrit/plugins/checks/acceptance/testsuite/TestCheckUpdate.java b/java/com/google/gerrit/plugins/checks/acceptance/testsuite/TestCheckUpdate.java
index 3362cfb..e3230af 100644
--- a/java/com/google/gerrit/plugins/checks/acceptance/testsuite/TestCheckUpdate.java
+++ b/java/com/google/gerrit/plugins/checks/acceptance/testsuite/TestCheckUpdate.java
@@ -38,26 +38,26 @@
public abstract Builder toBuilder();
public static Builder builder(CheckKey key) {
- return new AutoValue_TestCheckUpdate.Builder().setKey(key);
+ return new AutoValue_TestCheckUpdate.Builder().key(key);
}
@AutoValue.Builder
public abstract static class Builder {
- public abstract Builder setKey(CheckKey key);
+ public abstract Builder key(CheckKey key);
- public abstract Builder setState(CheckState state);
+ public abstract Builder state(CheckState state);
- public abstract Builder setUrl(String url);
+ public abstract Builder url(String url);
public Builder clearUrl() {
- return setUrl("");
+ return url("");
}
- public abstract Builder setStarted(Timestamp started);
+ public abstract Builder started(Timestamp started);
- public abstract Builder setFinished(Timestamp finished);
+ public abstract Builder finished(Timestamp finished);
- abstract Builder setCheckUpdater(ThrowingConsumer<TestCheckUpdate> checkUpdate);
+ abstract Builder checkUpdater(ThrowingConsumer<TestCheckUpdate> checkUpdate);
abstract TestCheckUpdate autoBuild();
diff --git a/javatests/com/google/gerrit/plugins/checks/acceptance/ChecksRefIT.java b/javatests/com/google/gerrit/plugins/checks/acceptance/ChecksRefIT.java
index 0482fae..b73c78f 100644
--- a/javatests/com/google/gerrit/plugins/checks/acceptance/ChecksRefIT.java
+++ b/javatests/com/google/gerrit/plugins/checks/acceptance/ChecksRefIT.java
@@ -39,7 +39,7 @@
public void noteDbRefOfCheckIsRemovedWhenChangeIsDeleted() throws Exception {
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey = CheckKey.create(project, patchSetId, checkerUuid);
- checkOperations.newCheck(checkKey).setState(CheckState.NOT_STARTED).upsert();
+ checkOperations.newCheck(checkKey).state(CheckState.NOT_STARTED).upsert();
String noteDbChecksRef = CheckerRef.checksRef(patchSetId.getParentKey());
assertThat(projectOperations.project(project).hasHead(noteDbChecksRef)).isTrue();
diff --git a/javatests/com/google/gerrit/plugins/checks/acceptance/ChecksRestApiBindingsIT.java b/javatests/com/google/gerrit/plugins/checks/acceptance/ChecksRestApiBindingsIT.java
index d34703d..f89bec0 100644
--- a/javatests/com/google/gerrit/plugins/checks/acceptance/ChecksRestApiBindingsIT.java
+++ b/javatests/com/google/gerrit/plugins/checks/acceptance/ChecksRestApiBindingsIT.java
@@ -64,7 +64,7 @@
public void checkEndpoints() throws Exception {
CheckerUuid checkerUuid = checkerOperations.newChecker().create();
CheckKey key = CheckKey.create(project, createChange().getPatchSetId(), checkerUuid);
- checkOperations.newCheck(key).setState(CheckState.RUNNING).upsert();
+ checkOperations.newCheck(key).state(CheckState.RUNNING).upsert();
RestApiCallHelper.execute(
adminRestSession,
@@ -77,7 +77,7 @@
public void scopedCheckEndpoints() throws Exception {
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey key = CheckKey.create(project, createChange().getPatchSetId(), checkerUuid);
- checkOperations.newCheck(key).setState(CheckState.RUNNING).upsert();
+ checkOperations.newCheck(key).state(CheckState.RUNNING).upsert();
RestApiCallHelper.execute(
adminRestSession,
SCOPED_CHECK_ENDPOINTS,
diff --git a/javatests/com/google/gerrit/plugins/checks/acceptance/api/ChangeCheckInfoIT.java b/javatests/com/google/gerrit/plugins/checks/acceptance/api/ChangeCheckInfoIT.java
index 771a581..66b360a 100644
--- a/javatests/com/google/gerrit/plugins/checks/acceptance/api/ChangeCheckInfoIT.java
+++ b/javatests/com/google/gerrit/plugins/checks/acceptance/api/ChangeCheckInfoIT.java
@@ -84,13 +84,13 @@
.hasValue(new ChangeCheckInfo("checks", CombinedCheckState.IN_PROGRESS));
checkOperations
.newCheck(CheckKey.create(project, psId, optionalCheckerUuid))
- .setState(CheckState.SUCCESSFUL)
+ .state(CheckState.SUCCESSFUL)
.upsert();
assertThat(getChangeCheckInfo(changeId))
.hasValue(new ChangeCheckInfo("checks", CombinedCheckState.IN_PROGRESS));
checkOperations
.newCheck(CheckKey.create(project, psId, requiredCheckerUuid))
- .setState(CheckState.FAILED)
+ .state(CheckState.FAILED)
.upsert();
assertThat(getChangeCheckInfo(changeId))
.hasValue(new ChangeCheckInfo("checks", CombinedCheckState.FAILED));
diff --git a/javatests/com/google/gerrit/plugins/checks/acceptance/api/GetCheckIT.java b/javatests/com/google/gerrit/plugins/checks/acceptance/api/GetCheckIT.java
index e3fbbb3..54599c7 100644
--- a/javatests/com/google/gerrit/plugins/checks/acceptance/api/GetCheckIT.java
+++ b/javatests/com/google/gerrit/plugins/checks/acceptance/api/GetCheckIT.java
@@ -78,7 +78,7 @@
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey = CheckKey.create(project, patchSetId, checkerUuid);
- checkOperations.newCheck(checkKey).setState(CheckState.RUNNING).upsert();
+ checkOperations.newCheck(checkKey).state(CheckState.RUNNING).upsert();
assertThat(getCheckInfo(patchSetId, checkerUuid))
.isEqualTo(checkOperations.check(checkKey).asInfo());
@@ -90,7 +90,7 @@
checkerOperations.newChecker().repository(project).name("My Checker").create();
CheckKey checkKey = CheckKey.create(project, patchSetId, checkerUuid);
- checkOperations.newCheck(checkKey).setState(CheckState.RUNNING).upsert();
+ checkOperations.newCheck(checkKey).state(CheckState.RUNNING).upsert();
CheckInfo expectedCheckInfo = checkOperations.check(checkKey).asInfo();
expectedCheckInfo.repository = project.get();
@@ -108,7 +108,7 @@
checkerOperations.newChecker().repository(project).name("My Checker").create();
CheckKey checkKey = CheckKey.create(project, patchSetId, checkerUuid);
- checkOperations.newCheck(checkKey).setState(CheckState.RUNNING).upsert();
+ checkOperations.newCheck(checkKey).state(CheckState.RUNNING).upsert();
CheckInfo expectedCheckInfo = checkOperations.check(checkKey).asInfo();
expectedCheckInfo.repository = project.get();
@@ -192,7 +192,7 @@
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey = CheckKey.create(project, patchSetId, checkerUuid);
- checkOperations.newCheck(checkKey).setState(CheckState.RUNNING).upsert();
+ checkOperations.newCheck(checkKey).state(CheckState.RUNNING).upsert();
assertThat(getCheckInfo(patchSetId, checkerUuid).state).isEqualTo(CheckState.RUNNING);
assertThat(getCheckInfo(patchSetId, checkerUuid, ListChecksOption.CHECKER).state)
@@ -285,7 +285,7 @@
checkerOperations.newChecker().repository(project).name("My Checker").create();
CheckKey checkKey = CheckKey.create(project, patchSetId, checkerUuid);
- checkOperations.newCheck(checkKey).setState(CheckState.RUNNING).upsert();
+ checkOperations.newCheck(checkKey).state(CheckState.RUNNING).upsert();
checkerOperations.checker(checkerUuid).forInvalidation().nonParseableConfig().invalidate();
@@ -382,11 +382,11 @@
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey1 = CheckKey.create(project, patchSetId, checkerUuid);
- checkOperations.newCheck(checkKey1).setState(CheckState.FAILED).upsert();
+ checkOperations.newCheck(checkKey1).state(CheckState.FAILED).upsert();
PatchSet.Id currentPatchSetId = createPatchSet();
CheckKey checkKey2 = CheckKey.create(project, currentPatchSetId, checkerUuid);
- checkOperations.newCheck(checkKey2).setState(CheckState.RUNNING).upsert();
+ checkOperations.newCheck(checkKey2).state(CheckState.RUNNING).upsert();
// get check for the old patch set
assertThat(checksApiFactory.revision(patchSetId).id(checkerUuid).get())
diff --git a/javatests/com/google/gerrit/plugins/checks/acceptance/api/ListChecksIT.java b/javatests/com/google/gerrit/plugins/checks/acceptance/api/ListChecksIT.java
index b320ada..ab2f75e 100644
--- a/javatests/com/google/gerrit/plugins/checks/acceptance/api/ListChecksIT.java
+++ b/javatests/com/google/gerrit/plugins/checks/acceptance/api/ListChecksIT.java
@@ -61,10 +61,10 @@
CheckerUuid checkerUuid2 = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey1 = CheckKey.create(project, patchSetId, checkerUuid1);
- checkOperations.newCheck(checkKey1).setState(CheckState.RUNNING).upsert();
+ checkOperations.newCheck(checkKey1).state(CheckState.RUNNING).upsert();
CheckKey checkKey2 = CheckKey.create(project, patchSetId, checkerUuid2);
- checkOperations.newCheck(checkKey2).setState(CheckState.FAILED).upsert();
+ checkOperations.newCheck(checkKey2).state(CheckState.FAILED).upsert();
assertThat(checksApiFactory.revision(patchSetId).list())
.containsExactly(
@@ -79,10 +79,10 @@
CheckerUuid checkerUuid2 = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey1 = CheckKey.create(project, patchSetId, checkerUuid1);
- checkOperations.newCheck(checkKey1).setState(CheckState.RUNNING).upsert();
+ checkOperations.newCheck(checkKey1).state(CheckState.RUNNING).upsert();
CheckKey checkKey2 = CheckKey.create(project, patchSetId, checkerUuid2);
- checkOperations.newCheck(checkKey2).setState(CheckState.FAILED).upsert();
+ checkOperations.newCheck(checkKey2).state(CheckState.FAILED).upsert();
CheckInfo expectedCheckInfo1 = checkOperations.check(checkKey1).asInfo();
expectedCheckInfo1.repository = project.get();
@@ -107,10 +107,10 @@
CheckerUuid checkerUuid2 = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey1 = CheckKey.create(project, patchSetId, checkerUuid1);
- checkOperations.newCheck(checkKey1).setState(CheckState.RUNNING).upsert();
+ checkOperations.newCheck(checkKey1).state(CheckState.RUNNING).upsert();
CheckKey checkKey2 = CheckKey.create(project, patchSetId, checkerUuid2);
- checkOperations.newCheck(checkKey2).setState(CheckState.FAILED).upsert();
+ checkOperations.newCheck(checkKey2).state(CheckState.FAILED).upsert();
CheckInfo expectedCheckInfo1 = checkOperations.check(checkKey1).asInfo();
expectedCheckInfo1.repository = project.get();
@@ -276,7 +276,7 @@
// create check on the first patch set
CheckKey checkKey1 = CheckKey.create(project, patchSetId, checkerUuid);
- checkOperations.newCheck(checkKey1).setState(CheckState.SUCCESSFUL).upsert();
+ checkOperations.newCheck(checkKey1).state(CheckState.SUCCESSFUL).upsert();
// create a second patch set
PatchSet.Id currentPatchSet = createPatchSet();
@@ -284,7 +284,7 @@
// create check on the second patch set, we expect that this check is not returned for the first
// patch set
CheckKey checkKey2 = CheckKey.create(project, currentPatchSet, checkerUuid);
- checkOperations.newCheck(checkKey2).setState(CheckState.RUNNING).upsert();
+ checkOperations.newCheck(checkKey2).state(CheckState.RUNNING).upsert();
// list checks for the old patch set
assertThat(checksApiFactory.revision(patchSetId).list())
diff --git a/javatests/com/google/gerrit/plugins/checks/acceptance/api/QueryPendingChecksIT.java b/javatests/com/google/gerrit/plugins/checks/acceptance/api/QueryPendingChecksIT.java
index 3116ee6..3148ce1 100644
--- a/javatests/com/google/gerrit/plugins/checks/acceptance/api/QueryPendingChecksIT.java
+++ b/javatests/com/google/gerrit/plugins/checks/acceptance/api/QueryPendingChecksIT.java
@@ -192,21 +192,21 @@
// Create a check with state "NOT_STARTED" that we expect to be returned.
checkOperations
.newCheck(CheckKey.create(project, patchSetId, checkerUuid))
- .setState(CheckState.NOT_STARTED)
+ .state(CheckState.NOT_STARTED)
.upsert();
// Create a check with state "FAILED" that we expect to be ignored.
PatchSet.Id patchSetId2 = createChange().getPatchSetId();
checkOperations
.newCheck(CheckKey.create(project, patchSetId2, checkerUuid))
- .setState(CheckState.FAILED)
+ .state(CheckState.FAILED)
.upsert();
// Create a check with state "NOT_STARTED" for other checker that we expect to be ignored.
CheckerUuid checkerUuid2 = checkerOperations.newChecker().repository(project).create();
checkOperations
.newCheck(CheckKey.create(project, patchSetId, checkerUuid2))
- .setState(CheckState.NOT_STARTED)
+ .state(CheckState.NOT_STARTED)
.upsert();
List<PendingChecksInfo> pendingChecksList = queryPendingChecks(checkerUuid);
@@ -226,21 +226,21 @@
// Create a check with state "FAILED" that we expect to be returned.
checkOperations
.newCheck(CheckKey.create(project, patchSetId, checkerUuid))
- .setState(CheckState.FAILED)
+ .state(CheckState.FAILED)
.upsert();
// Create a check with state "NOT_STARTED" that we expect to be ignored.
PatchSet.Id patchSetId2 = createChange().getPatchSetId();
checkOperations
.newCheck(CheckKey.create(project, patchSetId2, checkerUuid))
- .setState(CheckState.NOT_STARTED)
+ .state(CheckState.NOT_STARTED)
.upsert();
// Create a check with state "FAILED" for other checker that we expect to be ignored.
CheckerUuid checkerUuid2 = checkerOperations.newChecker().repository(project).create();
checkOperations
.newCheck(CheckKey.create(project, patchSetId, checkerUuid2))
- .setState(CheckState.FAILED)
+ .state(CheckState.FAILED)
.upsert();
List<PendingChecksInfo> pendingChecksList = queryPendingChecks(checkerUuid, CheckState.FAILED);
@@ -262,14 +262,14 @@
// update it.
checkOperations
.newCheck(CheckKey.create(project, patchSetId, checkerUuid))
- .setState(CheckState.NOT_STARTED)
+ .state(CheckState.NOT_STARTED)
.upsert();
for (CheckState checkState : CheckState.values()) {
checkOperations
.check(CheckKey.create(project, patchSetId, checkerUuid))
.forUpdate()
- .setState(checkState)
+ .state(checkState)
.upsert();
assertThat(queryPendingChecks(String.format("checker:\"%s\" is:%s", checkerUuid, checkState)))
@@ -286,14 +286,14 @@
// update it.
checkOperations
.newCheck(CheckKey.create(project, patchSetId, checkerUuid))
- .setState(CheckState.NOT_STARTED)
+ .state(CheckState.NOT_STARTED)
.upsert();
for (CheckState checkState : CheckState.values()) {
checkOperations
.check(CheckKey.create(project, patchSetId, checkerUuid))
.forUpdate()
- .setState(checkState)
+ .state(checkState)
.upsert();
List<PendingChecksInfo> pendingChecks =
@@ -328,28 +328,28 @@
// Create a check with state "NOT_STARTED" that we expect to be returned.
checkOperations
.newCheck(CheckKey.create(project, patchSetId, checkerUuid))
- .setState(CheckState.NOT_STARTED)
+ .state(CheckState.NOT_STARTED)
.upsert();
// Create a check with state "SCHEDULED" that we expect to be returned.
PatchSet.Id patchSetId2 = createChange().getPatchSetId();
checkOperations
.newCheck(CheckKey.create(project, patchSetId2, checkerUuid))
- .setState(CheckState.SCHEDULED)
+ .state(CheckState.SCHEDULED)
.upsert();
// Create a check with state "SUCCESSFUL" that we expect to be ignored.
PatchSet.Id patchSetId3 = createChange().getPatchSetId();
checkOperations
.newCheck(CheckKey.create(project, patchSetId3, checkerUuid))
- .setState(CheckState.SUCCESSFUL)
+ .state(CheckState.SUCCESSFUL)
.upsert();
// Create a check with state "NOT_STARTED" for other checker that we expect to be ignored.
CheckerUuid checkerUuid2 = checkerOperations.newChecker().repository(project).create();
checkOperations
.newCheck(CheckKey.create(project, patchSetId, checkerUuid2))
- .setState(CheckState.NOT_STARTED)
+ .state(CheckState.NOT_STARTED)
.upsert();
List<PendingChecksInfo> pendingChecksList =
@@ -383,14 +383,14 @@
// update it.
checkOperations
.newCheck(CheckKey.create(project, patchSetId, checkerUuid))
- .setState(CheckState.NOT_STARTED)
+ .state(CheckState.NOT_STARTED)
.upsert();
for (CheckState checkState : CheckState.values()) {
checkOperations
.check(CheckKey.create(project, patchSetId, checkerUuid))
.forUpdate()
- .setState(checkState)
+ .state(checkState)
.upsert();
List<PendingChecksInfo> pendingChecks =
@@ -444,7 +444,7 @@
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
checkOperations
.newCheck(CheckKey.create(project, patchSetId, checkerUuid))
- .setState(CheckState.NOT_STARTED)
+ .state(CheckState.NOT_STARTED)
.upsert();
List<PendingChecksInfo> pendingChecksList =
@@ -464,13 +464,13 @@
checkOperations
.newCheck(CheckKey.create(project, patchSetId, checkerUuid))
- .setState(CheckState.NOT_STARTED)
+ .state(CheckState.NOT_STARTED)
.upsert();
PatchSet.Id patchSetId2 = createChange().getPatchSetId();
checkOperations
.newCheck(CheckKey.create(project, patchSetId2, checkerUuid))
- .setState(CheckState.NOT_STARTED)
+ .state(CheckState.NOT_STARTED)
.upsert();
List<PendingChecksInfo> pendingChecksList =
@@ -491,13 +491,13 @@
checkOperations
.newCheck(CheckKey.create(project, patchSetId, checkerUuid))
- .setState(CheckState.NOT_STARTED)
+ .state(CheckState.NOT_STARTED)
.upsert();
PatchSet.Id patchSetId2 = createChange().getPatchSetId();
checkOperations
.newCheck(CheckKey.create(project, patchSetId2, checkerUuid))
- .setState(CheckState.NOT_STARTED)
+ .state(CheckState.NOT_STARTED)
.upsert();
List<PendingChecksInfo> pendingChecksList =
@@ -541,7 +541,7 @@
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
checkOperations
.newCheck(CheckKey.create(project, patchSetId, checkerUuid))
- .setState(CheckState.NOT_STARTED)
+ .state(CheckState.NOT_STARTED)
.upsert();
requestScopeOperations.setApiUser(user.getId());
@@ -561,7 +561,7 @@
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
checkOperations
.newCheck(CheckKey.create(project, patchSetId, checkerUuid))
- .setState(CheckState.NOT_STARTED)
+ .state(CheckState.NOT_STARTED)
.upsert();
requestScopeOperations.setApiUserAnonymous();
@@ -588,7 +588,7 @@
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
checkOperations
.newCheck(CheckKey.create(project, patchSetId, checkerUuid))
- .setState(CheckState.NOT_STARTED)
+ .state(CheckState.NOT_STARTED)
.upsert();
// Check is returned for admin user.
@@ -610,7 +610,7 @@
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
checkOperations
.newCheck(CheckKey.create(project, patchSetId, checkerUuid))
- .setState(CheckState.NOT_STARTED)
+ .state(CheckState.NOT_STARTED)
.upsert();
// Check is returned for admin user.
@@ -629,7 +629,7 @@
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
checkOperations
.newCheck(CheckKey.create(project, patchSetId, checkerUuid))
- .setState(CheckState.NOT_STARTED)
+ .state(CheckState.NOT_STARTED)
.upsert();
RestResponse r =
diff --git a/javatests/com/google/gerrit/plugins/checks/acceptance/api/UpdateCheckIT.java b/javatests/com/google/gerrit/plugins/checks/acceptance/api/UpdateCheckIT.java
index c39e68a..3c37987 100644
--- a/javatests/com/google/gerrit/plugins/checks/acceptance/api/UpdateCheckIT.java
+++ b/javatests/com/google/gerrit/plugins/checks/acceptance/api/UpdateCheckIT.java
@@ -101,7 +101,7 @@
@Test
public void unsetUrl() throws Exception {
- checkOperations.check(checkKey).forUpdate().setUrl("http://example.com/my-check").upsert();
+ checkOperations.check(checkKey).forUpdate().url("http://example.com/my-check").upsert();
CheckInput input = new CheckInput();
input.url = "";
@@ -296,7 +296,7 @@
@Test
public void stateCanBeSetToNotStarted() throws Exception {
- checkOperations.check(checkKey).forUpdate().setState(CheckState.FAILED).upsert();
+ checkOperations.check(checkKey).forUpdate().state(CheckState.FAILED).upsert();
CheckInput input = new CheckInput();
input.state = CheckState.NOT_STARTED;
@@ -310,8 +310,8 @@
checkOperations
.check(checkKey)
.forUpdate()
- .setState(CheckState.FAILED)
- .setUrl("https://www.example.com")
+ .state(CheckState.FAILED)
+ .url("https://www.example.com")
.upsert();
CheckInput input = new CheckInput();
diff --git a/javatests/com/google/gerrit/plugins/checks/acceptance/db/GetCombinedCheckStateIT.java b/javatests/com/google/gerrit/plugins/checks/acceptance/db/GetCombinedCheckStateIT.java
index 4941b1f..6ebd10b 100644
--- a/javatests/com/google/gerrit/plugins/checks/acceptance/db/GetCombinedCheckStateIT.java
+++ b/javatests/com/google/gerrit/plugins/checks/acceptance/db/GetCombinedCheckStateIT.java
@@ -127,6 +127,6 @@
private void setCheckState(CheckerUuid checkerUuid, CheckState checkState) {
CheckKey checkKey = CheckKey.create(project, patchSetId, checkerUuid);
- checkOperations.newCheck(checkKey).setState(checkState).upsert();
+ checkOperations.newCheck(checkKey).state(checkState).upsert();
}
}
diff --git a/javatests/com/google/gerrit/plugins/checks/acceptance/rules/ChecksSubmitRuleIT.java b/javatests/com/google/gerrit/plugins/checks/acceptance/rules/ChecksSubmitRuleIT.java
index 4aafbfc..9cd3059 100644
--- a/javatests/com/google/gerrit/plugins/checks/acceptance/rules/ChecksSubmitRuleIT.java
+++ b/javatests/com/google/gerrit/plugins/checks/acceptance/rules/ChecksSubmitRuleIT.java
@@ -154,6 +154,6 @@
private void postCheckResult(CheckerUuid checkerUuid, CheckState checkState) {
CheckKey checkKey = CheckKey.create(project, testPatchSetId, checkerUuid);
- checkOperations.newCheck(checkKey).setState(checkState).upsert();
+ checkOperations.newCheck(checkKey).state(checkState).upsert();
}
}
diff --git a/javatests/com/google/gerrit/plugins/checks/acceptance/testsuite/CheckOperationsImplTest.java b/javatests/com/google/gerrit/plugins/checks/acceptance/testsuite/CheckOperationsImplTest.java
index 54c0736..0b53666 100644
--- a/javatests/com/google/gerrit/plugins/checks/acceptance/testsuite/CheckOperationsImplTest.java
+++ b/javatests/com/google/gerrit/plugins/checks/acceptance/testsuite/CheckOperationsImplTest.java
@@ -133,7 +133,7 @@
public void specifiedUrlIsRespectedForCheckCreation() throws Exception {
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey = CheckKey.create(project, createChange().getPatchSetId(), checkerUuid);
- checkOperations.newCheck(checkKey).setUrl("http://example.com/my-check").upsert();
+ checkOperations.newCheck(checkKey).url("http://example.com/my-check").upsert();
CheckInfo check = getCheckFromServer(checkKey);
assertThat(check.url).isEqualTo("http://example.com/my-check");
@@ -153,7 +153,7 @@
public void specifiedStateIsRespectedForCheckCreation() throws Exception {
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey = CheckKey.create(project, createChange().getPatchSetId(), checkerUuid);
- checkOperations.newCheck(checkKey).setState(CheckState.FAILED).upsert();
+ checkOperations.newCheck(checkKey).state(CheckState.FAILED).upsert();
CheckInfo check = getCheckFromServer(checkKey);
assertThat(check.state).isEqualTo(CheckState.FAILED);
@@ -164,7 +164,7 @@
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey = CheckKey.create(project, createChange().getPatchSetId(), checkerUuid);
Timestamp started = new Timestamp(1234567L);
- checkOperations.newCheck(checkKey).setStarted(started).upsert();
+ checkOperations.newCheck(checkKey).started(started).upsert();
CheckInfo check = getCheckFromServer(checkKey);
assertTimestamp(check.started, started);
@@ -175,7 +175,7 @@
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey = CheckKey.create(project, createChange().getPatchSetId(), checkerUuid);
Timestamp finished = new Timestamp(1234567L);
- checkOperations.newCheck(checkKey).setFinished(finished).upsert();
+ checkOperations.newCheck(checkKey).finished(finished).upsert();
CheckInfo check = getCheckFromServer(checkKey);
assertTimestamp(check.finished, finished);
@@ -251,7 +251,7 @@
public void stateOfExistingCheckCanBeRetrieved() throws Exception {
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey = CheckKey.create(project, createChange().getPatchSetId(), checkerUuid);
- checkOperations.newCheck(checkKey).setState(CheckState.FAILED).upsert();
+ checkOperations.newCheck(checkKey).state(CheckState.FAILED).upsert();
CheckState checkState = checkOperations.check(checkKey).get().state();
@@ -262,7 +262,7 @@
public void urlOfExistingCheckCanBeRetrieved() throws Exception {
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey = CheckKey.create(project, createChange().getPatchSetId(), checkerUuid);
- checkOperations.newCheck(checkKey).setUrl("http://example.com/my-check").upsert();
+ checkOperations.newCheck(checkKey).url("http://example.com/my-check").upsert();
Optional<String> url = checkOperations.check(checkKey).get().url();
@@ -285,7 +285,7 @@
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey = CheckKey.create(project, createChange().getPatchSetId(), checkerUuid);
Timestamp started = new Timestamp(1234567L);
- checkOperations.newCheck(checkKey).setStarted(started).upsert();
+ checkOperations.newCheck(checkKey).started(started).upsert();
Optional<Timestamp> foundStarted = checkOperations.check(checkKey).get().started();
@@ -297,7 +297,7 @@
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey = CheckKey.create(project, createChange().getPatchSetId(), checkerUuid);
Timestamp finished = new Timestamp(1234567L);
- checkOperations.newCheck(checkKey).setFinished(finished).upsert();
+ checkOperations.newCheck(checkKey).finished(finished).upsert();
Optional<Timestamp> foundFinished = checkOperations.check(checkKey).get().finished();
@@ -348,9 +348,9 @@
public void updateWritesToInternalCheckSystem() throws Exception {
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey = CheckKey.create(project, createChange().getPatchSetId(), checkerUuid);
- checkOperations.newCheck(checkKey).setUrl("http://original-url").upsert();
+ checkOperations.newCheck(checkKey).url("http://original-url").upsert();
- checkOperations.check(checkKey).forUpdate().setUrl("http://updated-url").upsert();
+ checkOperations.check(checkKey).forUpdate().url("http://updated-url").upsert();
String currentUrl = getCheckFromServer(checkKey).url;
assertThat(currentUrl).isEqualTo("http://updated-url");
@@ -360,9 +360,9 @@
public void stateCanBeUpdated() throws Exception {
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey = CheckKey.create(project, createChange().getPatchSetId(), checkerUuid);
- checkOperations.newCheck(checkKey).setState(CheckState.FAILED).upsert();
+ checkOperations.newCheck(checkKey).state(CheckState.FAILED).upsert();
- checkOperations.check(checkKey).forUpdate().setState(CheckState.SUCCESSFUL).upsert();
+ checkOperations.check(checkKey).forUpdate().state(CheckState.SUCCESSFUL).upsert();
CheckState currentState = checkOperations.check(checkKey).get().state();
assertThat(currentState).isEqualTo(CheckState.SUCCESSFUL);
@@ -372,9 +372,9 @@
public void urlCanBeUpdated() throws Exception {
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey = CheckKey.create(project, createChange().getPatchSetId(), checkerUuid);
- checkOperations.newCheck(checkKey).setUrl("http://original-url").upsert();
+ checkOperations.newCheck(checkKey).url("http://original-url").upsert();
- checkOperations.check(checkKey).forUpdate().setUrl("http://updated-url").upsert();
+ checkOperations.check(checkKey).forUpdate().url("http://updated-url").upsert();
Optional<String> currentUrl = checkOperations.check(checkKey).get().url();
assertThat(currentUrl).hasValue("http://updated-url");
@@ -384,7 +384,7 @@
public void urlCanBeCleared() throws Exception {
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey = CheckKey.create(project, createChange().getPatchSetId(), checkerUuid);
- checkOperations.newCheck(checkKey).setUrl("http://original-url").upsert();
+ checkOperations.newCheck(checkKey).url("http://original-url").upsert();
checkOperations.check(checkKey).forUpdate().clearUrl().upsert();
@@ -396,10 +396,10 @@
public void startedCanBeUpdated() throws Exception {
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey = CheckKey.create(project, createChange().getPatchSetId(), checkerUuid);
- checkOperations.newCheck(checkKey).setStarted(new Timestamp(1234567L)).upsert();
+ checkOperations.newCheck(checkKey).started(new Timestamp(1234567L)).upsert();
Timestamp updatedStarted = new Timestamp(7654321L);
- checkOperations.check(checkKey).forUpdate().setStarted(updatedStarted).upsert();
+ checkOperations.check(checkKey).forUpdate().started(updatedStarted).upsert();
Optional<Timestamp> currentStarted = checkOperations.check(checkKey).get().started();
assertTimestamp(currentStarted, updatedStarted);
@@ -409,10 +409,10 @@
public void finishedCanBeUpdated() throws Exception {
CheckerUuid checkerUuid = checkerOperations.newChecker().repository(project).create();
CheckKey checkKey = CheckKey.create(project, createChange().getPatchSetId(), checkerUuid);
- checkOperations.newCheck(checkKey).setFinished(new Timestamp(1234567L)).upsert();
+ checkOperations.newCheck(checkKey).finished(new Timestamp(1234567L)).upsert();
Timestamp updatedFinished = new Timestamp(7654321L);
- checkOperations.check(checkKey).forUpdate().setFinished(updatedFinished).upsert();
+ checkOperations.check(checkKey).forUpdate().finished(updatedFinished).upsert();
Optional<Timestamp> currentFinished = checkOperations.check(checkKey).get().finished();
assertTimestamp(currentFinished, updatedFinished);
@@ -451,10 +451,10 @@
checkOperations
.newCheck(checkKey)
- .setState(CheckState.RUNNING)
- .setUrl("http://example.com/my-check")
- .setStarted(new Timestamp(1234567L))
- .setFinished(new Timestamp(7654321L))
+ .state(CheckState.RUNNING)
+ .url("http://example.com/my-check")
+ .started(new Timestamp(1234567L))
+ .finished(new Timestamp(7654321L))
.upsert();
Check check = checkOperations.check(checkKey).get();
CheckInfo checkInfo = checkOperations.check(checkKey).asInfo();