Fix broken PropertyAttributeExtractorTest Change-Id: I9d9b87a2cb41db8c4c5efa4d933b088bac62d7e3
diff --git a/src/test/java/com/googlesource/gerrit/plugins/hooks/util/PropertyAttributeExtractorTest.java b/src/test/java/com/googlesource/gerrit/plugins/hooks/util/PropertyAttributeExtractorTest.java index 0125bc0..ffc431b 100644 --- a/src/test/java/com/googlesource/gerrit/plugins/hooks/util/PropertyAttributeExtractorTest.java +++ b/src/test/java/com/googlesource/gerrit/plugins/hooks/util/PropertyAttributeExtractorTest.java
@@ -96,6 +96,7 @@ changeAttribute.number = "4711"; changeAttribute.url = "http://www.example.org/test"; changeAttribute.owner = owner; + changeAttribute.commitMessage = "Commit Message"; Property propertyProject = createMock(Property.class); expect(propertyFactory.create("project", "testProject")) @@ -141,6 +142,10 @@ expect(propertyFactory.create("owner-username", "testUsername")) .andReturn(propertyUsername); + Property propertyCommitMessage = createMock(Property.class); + expect(propertyFactory.create("commit-message", "Commit Message")) + .andReturn(propertyCommitMessage); + replayMocks(); @@ -161,6 +166,7 @@ expected.add(propertyEmail); expected.add(propertyName); expected.add(propertyUsername); + expected.add(propertyCommitMessage); assertEquals("Properties do not match", expected, actual); } @@ -180,6 +186,7 @@ changeAttribute.url = "http://www.example.org/test"; changeAttribute.status = Status.ABANDONED; changeAttribute.owner = owner; + changeAttribute.commitMessage = "Commit Message"; Property propertyProject = createMock(Property.class); expect(propertyFactory.create("project", "testProject")) @@ -225,6 +232,10 @@ expect(propertyFactory.create("owner-username", "testUsername")) .andReturn(propertyUsername); + Property propertyCommitMessage = createMock(Property.class); + expect(propertyFactory.create("commit-message", "Commit Message")) + .andReturn(propertyCommitMessage); + replayMocks(); @@ -245,6 +256,7 @@ expected.add(propertyEmail); expected.add(propertyName); expected.add(propertyUsername); + expected.add(propertyCommitMessage); assertEquals("Properties do not match", expected, actual); }