Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2006-12-28 22:40:58 +0000
committerChris Goldthorpe2006-12-28 22:40:58 +0000
commit7cc4040fccb9bca2fe856618344b6bbb512ac49f (patch)
tree1c3df40e8c8032b25a4ae5f16a4c0f0e2de770e7 /org.eclipse.ua.tests/cheatsheet/org/eclipse/ua
parent11c5356e53ca2eafb75953a35488abb2b4199486 (diff)
downloadeclipse.platform.ua-7cc4040fccb9bca2fe856618344b6bbb512ac49f.tar.gz
eclipse.platform.ua-7cc4040fccb9bca2fe856618344b6bbb512ac49f.tar.xz
eclipse.platform.ua-7cc4040fccb9bca2fe856618344b6bbb512ac49f.zip
Bug 162931 [CheatSheet] Suggest "taskGroup" elements with attribute kind="choice" that have only one child should produce no warning or error
Diffstat (limited to 'org.eclipse.ua.tests/cheatsheet/org/eclipse/ua')
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCompositeParser.java6
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskGroups.java8
2 files changed, 11 insertions, 3 deletions
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCompositeParser.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCompositeParser.java
index fb9ac3fa3..eb29d7b4c 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCompositeParser.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestCompositeParser.java
@@ -202,10 +202,10 @@ public class TestCompositeParser extends TestCase {
StatusCheck.assertStatusContains(parser.getStatus(), "has no children");
}
- public void testChoiceOneChild() {
- assertNull(parseTestFile("SingleChoice.xml"));
+ public void testChoiceNoChild() {
+ assertNull(parseTestFile("EmptyChoice.xml"));
assertEquals(IStatus.ERROR, parser.getStatus().getSeverity());
- StatusCheck.assertStatusContains(parser.getStatus(), "must have at least two child tasks");
+ StatusCheck.assertStatusContains(parser.getStatus(), "has no children");
}
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskGroups.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskGroups.java
index a074cd200..b556af9f5 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskGroups.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/composite/TestTaskGroups.java
@@ -95,6 +95,10 @@ public class TestTaskGroups extends TestCase {
assertEquals(NOT_STARTED, getGroupState(ITaskGroup.CHOICE, new int[] {NOT_STARTED, NOT_STARTED}));
}
+ public void testSingleChoiceNotStarted() {
+ assertEquals(NOT_STARTED, getGroupState(ITaskGroup.CHOICE, new int[] {NOT_STARTED}));
+ }
+
public void testChoiceInProgress() {
assertEquals(IN_PROGRESS, getGroupState(ITaskGroup.CHOICE, new int[] {IN_PROGRESS}));
}
@@ -107,6 +111,10 @@ public class TestTaskGroups extends TestCase {
assertEquals(COMPLETED, getGroupState(ITaskGroup.CHOICE, new int[] {COMPLETED, SKIPPED}));
}
+ public void testSingleChoiceCompleted() {
+ assertEquals(COMPLETED, getGroupState(ITaskGroup.CHOICE, new int[] {COMPLETED}));
+ }
+
public void testChoiceSkipped() {
assertEquals(COMPLETED, getGroupState(ITaskGroup.CHOICE, new int[] {NOT_STARTED, SKIPPED}));
}

Back to the top