Search in sources :

Example 11 with LabelTypes

use of com.google.gerrit.common.data.LabelTypes in project gerrit by GerritCodeReview.

the class GerritCommonTest method setUpEnvironment.

@Override
protected void setUpEnvironment(PrologEnvironment env) throws Exception {
    LabelTypes labelTypes = new LabelTypes(Arrays.asList(Util.codeReview(), Util.verified()));
    ChangeData cd = EasyMock.createMock(ChangeData.class);
    expect(cd.getLabelTypes()).andStubReturn(labelTypes);
    EasyMock.replay(cd);
    env.set(StoredValues.CHANGE_DATA, cd);
}
Also used : LabelTypes(com.google.gerrit.common.data.LabelTypes) ChangeData(com.google.gerrit.server.query.change.ChangeData)

Aggregations

LabelTypes (com.google.gerrit.common.data.LabelTypes)11 LabelType (com.google.gerrit.common.data.LabelType)8 LabelPermission (com.google.gerrit.server.permissions.LabelPermission)6 HashMap (java.util.HashMap)5 Map (java.util.Map)5 PermissionBackend (com.google.gerrit.server.permissions.PermissionBackend)4 ImmutableMap (com.google.common.collect.ImmutableMap)3 SubmitRecord (com.google.gerrit.common.data.SubmitRecord)3 DynamicMap (com.google.gerrit.extensions.registration.DynamicMap)3 PatchSetApproval (com.google.gerrit.reviewdb.client.PatchSetApproval)3 LinkedHashMap (java.util.LinkedHashMap)3 TreeMap (java.util.TreeMap)3 LabelValue (com.google.gerrit.common.data.LabelValue)2 AuthException (com.google.gerrit.extensions.restapi.AuthException)2 BadRequestException (com.google.gerrit.extensions.restapi.BadRequestException)2 Change (com.google.gerrit.reviewdb.client.Change)2 CurrentUser (com.google.gerrit.server.CurrentUser)2 IdentifiedUser (com.google.gerrit.server.IdentifiedUser)2 ChangeIndexCollection (com.google.gerrit.server.index.change.ChangeIndexCollection)2 ChangeControl (com.google.gerrit.server.project.ChangeControl)2