Hide Condition's getValue
Condition's getValue was effectively only used in tests.
Change-Id: I99bb432060281d34b3a827228033b818855a3be8
diff --git a/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/workflow/Condition.java b/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/workflow/Condition.java
index 1bb1564..47aae91 100644
--- a/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/workflow/Condition.java
+++ b/hooks-its/src/main/java/com/googlesource/gerrit/plugins/hooks/workflow/Condition.java
@@ -63,10 +63,6 @@
return key;
}
- public Set<String> getValues() {
- return values;
- }
-
/**
* Checks whether or not the Condition matches the given set of properties
*
diff --git a/hooks-its/src/test/java/com/googlesource/gerrit/plugins/hooks/workflow/ConditionTest.java b/hooks-its/src/test/java/com/googlesource/gerrit/plugins/hooks/workflow/ConditionTest.java
index d672ab7..857f9e8 100644
--- a/hooks-its/src/test/java/com/googlesource/gerrit/plugins/hooks/workflow/ConditionTest.java
+++ b/hooks-its/src/test/java/com/googlesource/gerrit/plugins/hooks/workflow/ConditionTest.java
@@ -17,10 +17,8 @@
import java.util.Collection;
import java.util.Collections;
-import java.util.Set;
import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
import com.google.gerrit.server.config.FactoryModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
@@ -29,36 +27,11 @@
public class ConditionTest extends LoggingMockingTestCase {
private Injector injector;
- public void testSimpleValue() {
- Condition condition = createCondition("testKey", "testValue");
- assertEquals("key not matching 'testKey'", "testKey", condition.getKey());
- Set<String> expectedValues = Sets.newHashSet();
- expectedValues.add("testValue");
- assertEquals("values do not match", expectedValues, condition.getValues());
- }
-
public void testGetKeyNull() {
Condition condition = new Condition(null, "testValues");
assertNull("key is not null", condition.getKey());
}
- public void testGetValuesNull() {
- Condition condition = createCondition("testKey", null);
- Set<String> values = condition.getValues();
- assertNotNull("values is null", values);
- assertTrue("values is not empty", values.isEmpty());
- }
-
- public void testOredValue() {
- Condition condition = createCondition("testKey", "value1,value2,value3");
- assertEquals("key not matching 'testKey'", "testKey", condition.getKey());
- Set<String> expectedValues = Sets.newLinkedHashSet();
- expectedValues.add("value1");
- expectedValues.add("value2");
- expectedValues.add("value3");
- assertEquals("values do not match", expectedValues, condition.getValues());
- }
-
public void testIsMetBySimple() {
Condition condition = createCondition("testKey", "testValue");
@@ -199,16 +172,6 @@
assertTrue("isMetBy gave false", condition.isMetBy(properties));
}
- public void testUnmodifiableValue() {
- Condition condition = createCondition("testKey", "testValue");
- Set<String> values = condition.getValues();
- try {
- values.add("value2");
- fail("value is not unmodifyable");
- } catch (UnsupportedOperationException e) {
- }
- }
-
private Condition createCondition(String key, String value) {
Condition.Factory factory = injector.getInstance(Condition.Factory.class);
return factory.create(key, value);