Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2010-06-17 19:57:44 +0000
committerChris Goldthorpe2010-06-17 19:57:44 +0000
commit1e868cd0daad165d8a13548ca39cadd420d39a35 (patch)
tree68c87b677e178da97a357b843d82da614d0b7604
parentd9a9a5566143550a0320a8ec8972e10b01b90173 (diff)
downloadeclipse.platform.ua-1e868cd0daad165d8a13548ca39cadd420d39a35.tar.gz
eclipse.platform.ua-1e868cd0daad165d8a13548ca39cadd420d39a35.tar.xz
eclipse.platform.ua-1e868cd0daad165d8a13548ca39cadd420d39a35.zip
Change test to not make assumptions about order of top level topics in toc
-rw-r--r--org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocProviderTest.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocProviderTest.java b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocProviderTest.java
index 3a1ac6b0b..faf82f25d 100644
--- a/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocProviderTest.java
+++ b/org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/toc/TocProviderTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2009, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -40,9 +40,16 @@ public class TocProviderTest extends TestCase {
}
assertNotNull("User Assistance Tests not found", uaToc);
ITopic[] children = uaToc.getTopics();
- ITopic lastChild = children[children.length - 1];
- assertEquals("Generated Parent", lastChild.getLabel());
- assertEquals(4, lastChild.getSubtopics().length);
+ int generatedParentTopics = 0;
+ for (int i = 0; i < children.length; i++) {
+ ITopic child = children[i];
+ if ("Generated Parent".equals(child.getLabel())) {
+ generatedParentTopics++;
+ assertEquals(4, child.getSubtopics().length);
+ }
+ }
+ assertEquals(1, generatedParentTopics);
+
}
}

Back to the top