Move extensions test utility sources to testing packages
In the vein of matching the Gerrit layout to what is used internally at Google: * Test utilities go in the java tree; specifically, tests for subpackage foo go in java/com/google/gerrit/foo/testing * java_library rules for test utilities get testonly = 1 * Tests for subpackage foo go in javatests/com/google/gerrit/foo * Tests for test utilities go in javatests/com/google/gerrit/foo/testing Change-Id: I6a537855d54809f5e033f299147121361e750a78
This commit is contained in:
committed by
Dave Borowitz
parent
594d1854cc
commit
261187922d
@@ -24,7 +24,8 @@ java_library(
|
|||||||
"//gerrit-server:server",
|
"//gerrit-server:server",
|
||||||
"//gerrit-server:testutil",
|
"//gerrit-server:testutil",
|
||||||
"//gerrit-sshd:sshd",
|
"//gerrit-sshd:sshd",
|
||||||
"//java/com/google/gerrit/extensions",
|
"//java/com/google/gerrit/extensions/common/testing:common-test-util",
|
||||||
|
"//java/com/google/gerrit/extensions/restapi/testing:restapi-test-util",
|
||||||
"//lib:args4j",
|
"//lib:args4j",
|
||||||
"//lib:gson",
|
"//lib:gson",
|
||||||
"//lib:guava-retrying",
|
"//lib:guava-retrying",
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ package com.google.gerrit.acceptance.api.revision;
|
|||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.TruthJUnit.assume;
|
import static com.google.common.truth.TruthJUnit.assume;
|
||||||
import static com.google.gerrit.extensions.common.DiffInfoSubject.assertThat;
|
import static com.google.gerrit.extensions.common.testing.DiffInfoSubject.assertThat;
|
||||||
import static com.google.gerrit.extensions.common.FileInfoSubject.assertThat;
|
import static com.google.gerrit.extensions.common.testing.FileInfoSubject.assertThat;
|
||||||
import static com.google.gerrit.reviewdb.client.Patch.COMMIT_MSG;
|
import static com.google.gerrit.reviewdb.client.Patch.COMMIT_MSG;
|
||||||
|
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ package com.google.gerrit.acceptance.api.revision;
|
|||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.common.truth.TruthJUnit.assume;
|
import static com.google.common.truth.TruthJUnit.assume;
|
||||||
import static com.google.gerrit.acceptance.PushOneCommit.SUBJECT;
|
import static com.google.gerrit.acceptance.PushOneCommit.SUBJECT;
|
||||||
import static com.google.gerrit.extensions.common.EditInfoSubject.assertThat;
|
import static com.google.gerrit.extensions.common.testing.EditInfoSubject.assertThat;
|
||||||
import static com.google.gerrit.extensions.common.RobotCommentInfoSubject.assertThatList;
|
import static com.google.gerrit.extensions.common.testing.RobotCommentInfoSubject.assertThatList;
|
||||||
import static java.util.stream.Collectors.toList;
|
import static java.util.stream.Collectors.toList;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
@@ -38,11 +38,11 @@ import com.google.gerrit.extensions.common.FixSuggestionInfo;
|
|||||||
import com.google.gerrit.extensions.common.RobotCommentInfo;
|
import com.google.gerrit.extensions.common.RobotCommentInfo;
|
||||||
import com.google.gerrit.extensions.restapi.BadRequestException;
|
import com.google.gerrit.extensions.restapi.BadRequestException;
|
||||||
import com.google.gerrit.extensions.restapi.BinaryResult;
|
import com.google.gerrit.extensions.restapi.BinaryResult;
|
||||||
import com.google.gerrit.extensions.restapi.BinaryResultSubject;
|
|
||||||
import com.google.gerrit.extensions.restapi.MethodNotAllowedException;
|
import com.google.gerrit.extensions.restapi.MethodNotAllowedException;
|
||||||
import com.google.gerrit.extensions.restapi.ResourceConflictException;
|
import com.google.gerrit.extensions.restapi.ResourceConflictException;
|
||||||
import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
|
import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
|
||||||
import com.google.gerrit.extensions.restapi.RestApiException;
|
import com.google.gerrit.extensions.restapi.RestApiException;
|
||||||
|
import com.google.gerrit.extensions.restapi.testing.BinaryResultSubject;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ import static com.google.gerrit.extensions.client.ListChangesOption.CURRENT_COMM
|
|||||||
import static com.google.gerrit.extensions.client.ListChangesOption.CURRENT_REVISION;
|
import static com.google.gerrit.extensions.client.ListChangesOption.CURRENT_REVISION;
|
||||||
import static com.google.gerrit.extensions.client.ListChangesOption.DETAILED_LABELS;
|
import static com.google.gerrit.extensions.client.ListChangesOption.DETAILED_LABELS;
|
||||||
import static com.google.gerrit.extensions.client.ListChangesOption.MESSAGES;
|
import static com.google.gerrit.extensions.client.ListChangesOption.MESSAGES;
|
||||||
import static com.google.gerrit.extensions.common.EditInfoSubject.assertThat;
|
import static com.google.gerrit.extensions.common.testing.EditInfoSubject.assertThat;
|
||||||
import static com.google.gerrit.extensions.restapi.BinaryResultSubject.assertThat;
|
import static com.google.gerrit.extensions.restapi.testing.BinaryResultSubject.assertThat;
|
||||||
import static com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS;
|
import static com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS;
|
||||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import static com.google.gerrit.extensions.client.ListChangesOption.CURRENT_REVI
|
|||||||
import static com.google.gerrit.extensions.client.ListChangesOption.DETAILED_ACCOUNTS;
|
import static com.google.gerrit.extensions.client.ListChangesOption.DETAILED_ACCOUNTS;
|
||||||
import static com.google.gerrit.extensions.client.ListChangesOption.DETAILED_LABELS;
|
import static com.google.gerrit.extensions.client.ListChangesOption.DETAILED_LABELS;
|
||||||
import static com.google.gerrit.extensions.client.ListChangesOption.MESSAGES;
|
import static com.google.gerrit.extensions.client.ListChangesOption.MESSAGES;
|
||||||
import static com.google.gerrit.extensions.common.EditInfoSubject.assertThat;
|
import static com.google.gerrit.extensions.common.testing.EditInfoSubject.assertThat;
|
||||||
import static com.google.gerrit.server.git.receive.ReceiveConstants.PUSH_OPTION_SKIP_VALIDATION;
|
import static com.google.gerrit.server.git.receive.ReceiveConstants.PUSH_OPTION_SKIP_VALIDATION;
|
||||||
import static com.google.gerrit.server.group.SystemGroupBackend.ANONYMOUS_USERS;
|
import static com.google.gerrit.server.group.SystemGroupBackend.ANONYMOUS_USERS;
|
||||||
import static com.google.gerrit.server.project.Util.category;
|
import static com.google.gerrit.server.project.Util.category;
|
||||||
@@ -65,9 +65,9 @@ import com.google.gerrit.extensions.common.ChangeInfo;
|
|||||||
import com.google.gerrit.extensions.common.ChangeMessageInfo;
|
import com.google.gerrit.extensions.common.ChangeMessageInfo;
|
||||||
import com.google.gerrit.extensions.common.CommentInfo;
|
import com.google.gerrit.extensions.common.CommentInfo;
|
||||||
import com.google.gerrit.extensions.common.EditInfo;
|
import com.google.gerrit.extensions.common.EditInfo;
|
||||||
import com.google.gerrit.extensions.common.EditInfoSubject;
|
|
||||||
import com.google.gerrit.extensions.common.LabelInfo;
|
import com.google.gerrit.extensions.common.LabelInfo;
|
||||||
import com.google.gerrit.extensions.common.RevisionInfo;
|
import com.google.gerrit.extensions.common.RevisionInfo;
|
||||||
|
import com.google.gerrit.extensions.common.testing.EditInfoSubject;
|
||||||
import com.google.gerrit.reviewdb.client.AccountGroup;
|
import com.google.gerrit.reviewdb.client.AccountGroup;
|
||||||
import com.google.gerrit.reviewdb.client.Change;
|
import com.google.gerrit.reviewdb.client.Change;
|
||||||
import com.google.gerrit.reviewdb.client.ChangeMessage;
|
import com.google.gerrit.reviewdb.client.ChangeMessage;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ package com.google.gerrit.acceptance.server.change;
|
|||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static com.google.gerrit.acceptance.GitUtil.pushHead;
|
import static com.google.gerrit.acceptance.GitUtil.pushHead;
|
||||||
import static com.google.gerrit.extensions.common.EditInfoSubject.assertThat;
|
import static com.google.gerrit.extensions.common.testing.EditInfoSubject.assertThat;
|
||||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|||||||
@@ -54,7 +54,8 @@ junit_tests(
|
|||||||
srcs = glob(["src/test/java/**/*Test.java"]),
|
srcs = glob(["src/test/java/**/*Test.java"]),
|
||||||
deps = [
|
deps = [
|
||||||
":api",
|
":api",
|
||||||
"//java/com/google/gerrit/extensions",
|
"//java/com/google/gerrit/extensions/client/testing:client-test-util",
|
||||||
|
"//java/com/google/gerrit/extensions/common/testing:common-test-util",
|
||||||
"//lib:truth",
|
"//lib:truth",
|
||||||
"//lib/guice",
|
"//lib/guice",
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
package com.google.gerrit.extensions.client;
|
package com.google.gerrit.extensions.client;
|
||||||
|
|
||||||
import static com.google.gerrit.extensions.client.RangeSubject.assertThat;
|
import static com.google.gerrit.extensions.client.testing.RangeSubject.assertThat;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ junit_tests(
|
|||||||
":testutil",
|
":testutil",
|
||||||
"//gerrit-index:query_exception",
|
"//gerrit-index:query_exception",
|
||||||
"//gerrit-patch-jgit:server",
|
"//gerrit-patch-jgit:server",
|
||||||
"//java/com/google/gerrit/extensions",
|
"//java/com/google/gerrit/extensions/common/testing:common-test-util",
|
||||||
"//lib:args4j",
|
"//lib:args4j",
|
||||||
"//lib:grappa",
|
"//lib:grappa",
|
||||||
"//lib:gson",
|
"//lib:gson",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ package com.google.gerrit.server.config;
|
|||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
|
|
||||||
import com.google.gerrit.extensions.common.PathSubject;
|
import com.google.gerrit.extensions.common.testing.PathSubject;
|
||||||
import com.google.gerrit.server.util.HostPlatform;
|
import com.google.gerrit.server.util.HostPlatform;
|
||||||
import com.google.gerrit.testutil.GerritBaseTests;
|
import com.google.gerrit.testutil.GerritBaseTests;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
java_library(
|
java_library(
|
||||||
name = "extensions",
|
name = "client-test-util",
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
srcs = glob(["**/*.java"]),
|
srcs = glob(["**/*.java"]),
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package com.google.gerrit.extensions.client;
|
package com.google.gerrit.extensions.client.testing;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertAbout;
|
import static com.google.common.truth.Truth.assertAbout;
|
||||||
|
|
||||||
@@ -20,6 +20,7 @@ import com.google.common.truth.FailureMetadata;
|
|||||||
import com.google.common.truth.IntegerSubject;
|
import com.google.common.truth.IntegerSubject;
|
||||||
import com.google.common.truth.Subject;
|
import com.google.common.truth.Subject;
|
||||||
import com.google.common.truth.Truth;
|
import com.google.common.truth.Truth;
|
||||||
|
import com.google.gerrit.extensions.client.Comment;
|
||||||
|
|
||||||
public class RangeSubject extends Subject<RangeSubject, Comment.Range> {
|
public class RangeSubject extends Subject<RangeSubject, Comment.Range> {
|
||||||
|
|
||||||
12
java/com/google/gerrit/extensions/common/testing/BUILD
Normal file
12
java/com/google/gerrit/extensions/common/testing/BUILD
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
java_library(
|
||||||
|
name = "common-test-util",
|
||||||
|
testonly = 1,
|
||||||
|
srcs = glob(["**/*.java"]),
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [
|
||||||
|
"//gerrit-extension-api:api",
|
||||||
|
"//java/com/google/gerrit/extensions/client/testing:client-test-util",
|
||||||
|
"//java/com/google/gerrit/truth",
|
||||||
|
"//lib:truth",
|
||||||
|
],
|
||||||
|
)
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package com.google.gerrit.extensions.common;
|
package com.google.gerrit.extensions.common.testing;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertAbout;
|
import static com.google.common.truth.Truth.assertAbout;
|
||||||
|
|
||||||
@@ -20,6 +20,7 @@ import com.google.common.truth.FailureMetadata;
|
|||||||
import com.google.common.truth.StringSubject;
|
import com.google.common.truth.StringSubject;
|
||||||
import com.google.common.truth.Subject;
|
import com.google.common.truth.Subject;
|
||||||
import com.google.common.truth.Truth;
|
import com.google.common.truth.Truth;
|
||||||
|
import com.google.gerrit.extensions.common.CommitInfo;
|
||||||
import com.google.gerrit.truth.ListSubject;
|
import com.google.gerrit.truth.ListSubject;
|
||||||
|
|
||||||
public class CommitInfoSubject extends Subject<CommitInfoSubject, CommitInfo> {
|
public class CommitInfoSubject extends Subject<CommitInfoSubject, CommitInfo> {
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package com.google.gerrit.extensions.common;
|
package com.google.gerrit.extensions.common.testing;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertAbout;
|
import static com.google.common.truth.Truth.assertAbout;
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package com.google.gerrit.extensions.common;
|
package com.google.gerrit.extensions.common.testing;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertAbout;
|
import static com.google.common.truth.Truth.assertAbout;
|
||||||
|
|
||||||
@@ -20,6 +20,8 @@ import com.google.common.truth.ComparableSubject;
|
|||||||
import com.google.common.truth.FailureMetadata;
|
import com.google.common.truth.FailureMetadata;
|
||||||
import com.google.common.truth.Subject;
|
import com.google.common.truth.Subject;
|
||||||
import com.google.common.truth.Truth;
|
import com.google.common.truth.Truth;
|
||||||
|
import com.google.gerrit.extensions.common.ChangeType;
|
||||||
|
import com.google.gerrit.extensions.common.DiffInfo;
|
||||||
import com.google.gerrit.extensions.common.DiffInfo.ContentEntry;
|
import com.google.gerrit.extensions.common.DiffInfo.ContentEntry;
|
||||||
import com.google.gerrit.truth.ListSubject;
|
import com.google.gerrit.truth.ListSubject;
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package com.google.gerrit.extensions.common;
|
package com.google.gerrit.extensions.common.testing;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertAbout;
|
import static com.google.common.truth.Truth.assertAbout;
|
||||||
|
|
||||||
@@ -20,6 +20,7 @@ import com.google.common.truth.FailureMetadata;
|
|||||||
import com.google.common.truth.StringSubject;
|
import com.google.common.truth.StringSubject;
|
||||||
import com.google.common.truth.Subject;
|
import com.google.common.truth.Subject;
|
||||||
import com.google.common.truth.Truth;
|
import com.google.common.truth.Truth;
|
||||||
|
import com.google.gerrit.extensions.common.EditInfo;
|
||||||
import com.google.gerrit.truth.OptionalSubject;
|
import com.google.gerrit.truth.OptionalSubject;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package com.google.gerrit.extensions.common;
|
package com.google.gerrit.extensions.common.testing;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertAbout;
|
import static com.google.common.truth.Truth.assertAbout;
|
||||||
|
|
||||||
@@ -21,6 +21,7 @@ import com.google.common.truth.FailureMetadata;
|
|||||||
import com.google.common.truth.IntegerSubject;
|
import com.google.common.truth.IntegerSubject;
|
||||||
import com.google.common.truth.Subject;
|
import com.google.common.truth.Subject;
|
||||||
import com.google.common.truth.Truth;
|
import com.google.common.truth.Truth;
|
||||||
|
import com.google.gerrit.extensions.common.FileInfo;
|
||||||
|
|
||||||
public class FileInfoSubject extends Subject<FileInfoSubject, FileInfo> {
|
public class FileInfoSubject extends Subject<FileInfoSubject, FileInfo> {
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package com.google.gerrit.extensions.common;
|
package com.google.gerrit.extensions.common.testing;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertAbout;
|
import static com.google.common.truth.Truth.assertAbout;
|
||||||
|
|
||||||
@@ -20,7 +20,8 @@ import com.google.common.truth.FailureMetadata;
|
|||||||
import com.google.common.truth.StringSubject;
|
import com.google.common.truth.StringSubject;
|
||||||
import com.google.common.truth.Subject;
|
import com.google.common.truth.Subject;
|
||||||
import com.google.common.truth.Truth;
|
import com.google.common.truth.Truth;
|
||||||
import com.google.gerrit.extensions.client.RangeSubject;
|
import com.google.gerrit.extensions.client.testing.RangeSubject;
|
||||||
|
import com.google.gerrit.extensions.common.FixReplacementInfo;
|
||||||
|
|
||||||
public class FixReplacementInfoSubject
|
public class FixReplacementInfoSubject
|
||||||
extends Subject<FixReplacementInfoSubject, FixReplacementInfo> {
|
extends Subject<FixReplacementInfoSubject, FixReplacementInfo> {
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package com.google.gerrit.extensions.common;
|
package com.google.gerrit.extensions.common.testing;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertAbout;
|
import static com.google.common.truth.Truth.assertAbout;
|
||||||
|
|
||||||
@@ -20,6 +20,8 @@ import com.google.common.truth.FailureMetadata;
|
|||||||
import com.google.common.truth.StringSubject;
|
import com.google.common.truth.StringSubject;
|
||||||
import com.google.common.truth.Subject;
|
import com.google.common.truth.Subject;
|
||||||
import com.google.common.truth.Truth;
|
import com.google.common.truth.Truth;
|
||||||
|
import com.google.gerrit.extensions.common.FixReplacementInfo;
|
||||||
|
import com.google.gerrit.extensions.common.FixSuggestionInfo;
|
||||||
import com.google.gerrit.truth.ListSubject;
|
import com.google.gerrit.truth.ListSubject;
|
||||||
|
|
||||||
public class FixSuggestionInfoSubject extends Subject<FixSuggestionInfoSubject, FixSuggestionInfo> {
|
public class FixSuggestionInfoSubject extends Subject<FixSuggestionInfoSubject, FixSuggestionInfo> {
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package com.google.gerrit.extensions.common;
|
package com.google.gerrit.extensions.common.testing;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertAbout;
|
import static com.google.common.truth.Truth.assertAbout;
|
||||||
|
|
||||||
@@ -20,6 +20,7 @@ import com.google.common.truth.ComparableSubject;
|
|||||||
import com.google.common.truth.FailureMetadata;
|
import com.google.common.truth.FailureMetadata;
|
||||||
import com.google.common.truth.Subject;
|
import com.google.common.truth.Subject;
|
||||||
import com.google.common.truth.Truth;
|
import com.google.common.truth.Truth;
|
||||||
|
import com.google.gerrit.extensions.common.GitPerson;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
public class GitPersonSubject extends Subject<GitPersonSubject, GitPerson> {
|
public class GitPersonSubject extends Subject<GitPersonSubject, GitPerson> {
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package com.google.gerrit.extensions.common;
|
package com.google.gerrit.extensions.common.testing;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertAbout;
|
import static com.google.common.truth.Truth.assertAbout;
|
||||||
|
|
||||||
@@ -12,12 +12,14 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package com.google.gerrit.extensions.common;
|
package com.google.gerrit.extensions.common.testing;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertAbout;
|
import static com.google.common.truth.Truth.assertAbout;
|
||||||
|
|
||||||
import com.google.common.truth.FailureMetadata;
|
import com.google.common.truth.FailureMetadata;
|
||||||
import com.google.common.truth.Subject;
|
import com.google.common.truth.Subject;
|
||||||
|
import com.google.gerrit.extensions.common.FixSuggestionInfo;
|
||||||
|
import com.google.gerrit.extensions.common.RobotCommentInfo;
|
||||||
import com.google.gerrit.truth.ListSubject;
|
import com.google.gerrit.truth.ListSubject;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
11
java/com/google/gerrit/extensions/restapi/testing/BUILD
Normal file
11
java/com/google/gerrit/extensions/restapi/testing/BUILD
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
java_library(
|
||||||
|
name = "restapi-test-util",
|
||||||
|
testonly = 1,
|
||||||
|
srcs = glob(["**/*.java"]),
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [
|
||||||
|
"//gerrit-extension-api:api",
|
||||||
|
"//java/com/google/gerrit/truth",
|
||||||
|
"//lib:truth",
|
||||||
|
],
|
||||||
|
)
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package com.google.gerrit.extensions.restapi;
|
package com.google.gerrit.extensions.restapi.testing;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertAbout;
|
import static com.google.common.truth.Truth.assertAbout;
|
||||||
|
|
||||||
@@ -21,6 +21,7 @@ import com.google.common.truth.PrimitiveByteArraySubject;
|
|||||||
import com.google.common.truth.StringSubject;
|
import com.google.common.truth.StringSubject;
|
||||||
import com.google.common.truth.Subject;
|
import com.google.common.truth.Subject;
|
||||||
import com.google.common.truth.Truth;
|
import com.google.common.truth.Truth;
|
||||||
|
import com.google.gerrit.extensions.restapi.BinaryResult;
|
||||||
import com.google.gerrit.truth.OptionalSubject;
|
import com.google.gerrit.truth.OptionalSubject;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
Reference in New Issue
Block a user