Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Dos Santos2013-12-13 19:26:37 +0000
committerGerrit Code Review @ Eclipse.org2013-12-18 01:13:01 +0000
commitb7eef8e0c8da174009283d5a2c7e2c518c21e9fd (patch)
tree37dced3a9d767f1784914896e6d5968d8033ecc8 /org.eclipse.mylyn.tasks.tests/src
parent461cb61c85d4f7872c0faf5b9174d999bfcc98f5 (diff)
downloadorg.eclipse.mylyn.tasks-b7eef8e0c8da174009283d5a2c7e2c518c21e9fd.tar.gz
org.eclipse.mylyn.tasks-b7eef8e0c8da174009283d5a2c7e2c518c21e9fd.tar.xz
org.eclipse.mylyn.tasks-b7eef8e0c8da174009283d5a2c7e2c518c21e9fd.zip
378032: [api] provide editor support for required attributes
Change-Id: I711b84be94880ab04fe0bfb15464bb4c5aa6cf33 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=378032 Signed-off-by: Leo Dos Santos <leo.dos.santos@tasktop.com>
Diffstat (limited to 'org.eclipse.mylyn.tasks.tests/src')
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/AttributeEditorTest.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/AttributeEditorTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/AttributeEditorTest.java
index 77f3a15a1..d328f79b9 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/AttributeEditorTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/AttributeEditorTest.java
@@ -50,8 +50,8 @@ public class AttributeEditorTest extends TestCase {
}
@Override
- public boolean isRequired() {
- return super.isRequired();
+ public boolean needsValue() {
+ return super.needsValue();
}
@Override
@@ -90,22 +90,22 @@ public class AttributeEditorTest extends TestCase {
public void testDetermineNotRequired() throws Exception {
TaskAttribute attribute = new TaskAttribute(taskData.getRoot(), "not.required.field");
MockAttributeEditor editor = new MockAttributeEditor(manager, attribute);
- assertFalse(editor.isRequired());
+ assertFalse(editor.needsValue());
attribute.setValue("");
- assertFalse(editor.isRequired());
+ assertFalse(editor.needsValue());
attribute.setValue("abc");
- assertFalse(editor.isRequired());
+ assertFalse(editor.needsValue());
}
public void testDetermineRequired() throws Exception {
TaskAttribute attribute = new TaskAttribute(taskData.getRoot(), "a.required.field");
attribute.getMetaData().setRequired(true);
MockAttributeEditor editor = new MockAttributeEditor(manager, attribute);
- assertTrue(editor.isRequired());
+ assertTrue(editor.needsValue());
attribute.setValue("");
- assertTrue(editor.isRequired());
+ assertTrue(editor.needsValue());
attribute.setValue("abc");
- assertFalse(editor.isRequired());
+ assertFalse(editor.needsValue());
}
public void testDecorateRequired() throws Exception {
@@ -145,9 +145,9 @@ public class AttributeEditorTest extends TestCase {
}
@Override
- public boolean isRequired() {
+ public boolean needsValue() {
eventLog.append("asked");
- return super.isRequired();
+ return super.needsValue();
}
};

Back to the top