diff options
author | Dejan Gloszic | 2006-01-23 23:55:52 +0000 |
---|---|---|
committer | Dejan Gloszic | 2006-01-23 23:55:52 +0000 |
commit | b236593e841adc82d9d06c68e0995b9fba2bceb6 (patch) | |
tree | 58d99c6fc3b748774f3d52f5ec0dd22604a24a67 /org.eclipse.ua.tests/intro/org | |
parent | fdbb5aad7e386954037aa3de6ce82edef8548bfe (diff) | |
download | eclipse.platform.ua-b236593e841adc82d9d06c68e0995b9fba2bceb6.tar.gz eclipse.platform.ua-b236593e841adc82d9d06c68e0995b9fba2bceb6.tar.xz eclipse.platform.ua-b236593e841adc82d9d06c68e0995b9fba2bceb6.zip |
*** empty log message ***v20060123
Diffstat (limited to 'org.eclipse.ua.tests/intro/org')
-rw-r--r-- | org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/PlatformTest.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/PlatformTest.java b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/PlatformTest.java index e178c31ca..cff996c56 100644 --- a/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/PlatformTest.java +++ b/org.eclipse.ua.tests/intro/org/eclipse/ua/tests/intro/parser/PlatformTest.java @@ -21,6 +21,7 @@ import junit.framework.TestCase; import junit.framework.TestSuite; import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IExtension; import org.eclipse.core.runtime.Platform; import org.eclipse.ua.tests.intro.util.IntroModelSerializer; import org.eclipse.ua.tests.intro.util.IntroModelSerializerTest; @@ -49,10 +50,18 @@ public class PlatformTest extends TestCase { * Test the platform's parsed intro content. */ public void testModel() { + final String INTRO_CONFIG_ID = "intro"; IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor("org.eclipse.ui.intro.config"); - Assert.assertEquals("The platform did not have the expected number of \"org.eclipse.ui.intro.config\" extensions.", 1, elements.length); - - IConfigurationElement element = elements[0]; + IConfigurationElement element = null; + for (int i=0;i<elements.length;++i) { + if (elements[i] != null) { + IExtension ext = elements[i].getDeclaringExtension(); + if (INTRO_CONFIG_ID.equals(ext.getSimpleIdentifier())) { + element = elements[i]; + } + } + } + Assert.assertNotNull("Could not find the \"org.eclipse.ui.intro.config\" extension with the id \"" + INTRO_CONFIG_ID + "\".", element); String pluginRoot = ResourceFinder.findFile(UserAssistanceTestPlugin.getDefault(), "/").toString().substring("file:".length()); String content = element.getAttribute("content"); |