PropertyAttributeExtractor: Fix tests
Change I5422cfd7bce3 accidentally reintroduced some mocks that were
removed in the previous change (I59b7452f8b) making the tests fail.
Change-Id: I9a217f44c78f0a6aed961c2fe4737e94d37c70ca
diff --git a/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyAttributeExtractorTest.java b/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyAttributeExtractorTest.java
index 69d8196..0bb884d 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyAttributeExtractorTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/its/base/util/PropertyAttributeExtractorTest.java
@@ -98,7 +98,6 @@
owner.username = "testUsername";
ChangeAttribute changeAttribute = new ChangeAttribute();
- changeAttribute.project = "testProject";
changeAttribute.branch = "testBranch";
changeAttribute.topic = "testTopic";
changeAttribute.subject = "testSubject";
@@ -108,9 +107,6 @@
changeAttribute.owner = owner;
changeAttribute.commitMessage = "Commit Message";
- Property propertyProject = createMock(Property.class);
- expect(propertyFactory.create("project", "testProject")).andReturn(propertyProject);
-
Property propertyBranch = createMock(Property.class);
expect(propertyFactory.create("branch", "testBranch")).andReturn(propertyBranch);
@@ -187,7 +183,6 @@
Set<Property> actual = extractor.extractFrom(changeAttribute);
Set<Property> expected = Sets.newHashSet();
- expected.add(propertyProject);
expected.add(propertyBranch);
expected.add(propertyTopic);
expected.add(propertySubject);
@@ -218,7 +213,6 @@
owner.username = "testUsername";
ChangeAttribute changeAttribute = new ChangeAttribute();
- changeAttribute.project = "testProject";
changeAttribute.branch = "testBranch";
changeAttribute.topic = "testTopic";
changeAttribute.subject = "testSubject";
@@ -229,9 +223,6 @@
changeAttribute.owner = owner;
changeAttribute.commitMessage = "Commit Message";
- Property propertyProject = createMock(Property.class);
- expect(propertyFactory.create("project", "testProject")).andReturn(propertyProject);
-
Property propertyBranch = createMock(Property.class);
expect(propertyFactory.create("branch", "testBranch")).andReturn(propertyBranch);
@@ -308,7 +299,6 @@
Set<Property> actual = extractor.extractFrom(changeAttribute);
Set<Property> expected = Sets.newHashSet();
- expected.add(propertyProject);
expected.add(propertyBranch);
expected.add(propertyTopic);
expected.add(propertySubject);
@@ -458,7 +448,6 @@
RefUpdateAttribute refUpdateAttribute = new RefUpdateAttribute();
refUpdateAttribute.newRev = "1234567891123456789212345678931234567894";
refUpdateAttribute.oldRev = "9876543211987654321298765432139876543214";
- refUpdateAttribute.project = "testProject";
refUpdateAttribute.refName = "testRef";
Property propertyRevision = createMock(Property.class);
@@ -473,9 +462,6 @@
expect(propertyFactory.create("revision-old", "9876543211987654321298765432139876543214"))
.andReturn(propertyRevisionOld2);
- Property propertyProject = createMock(Property.class);
- expect(propertyFactory.create("project", "testProject")).andReturn(propertyProject);
-
Property propertyRef = createMock(Property.class);
expect(propertyFactory.create("ref", "testRef")).andReturn(propertyRef);
@@ -489,7 +475,6 @@
expected.add(propertyRevision);
expected.add(propertyRevisionOld);
expected.add(propertyRevisionOld2);
- expected.add(propertyProject);
expected.add(propertyRef);
assertEquals("Properties do not match", expected, actual);
}