Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBJ Hargrave2011-10-10 19:04:16 +0000
committerBJ Hargrave2011-10-10 19:04:16 +0000
commitc9e9b24fdb3c5a010cb0350dbc20a611d36f30f9 (patch)
tree279652ff7f6122a2125ff8cda84e14f29628d9dc /bundles/org.eclipse.equinox.compendium.tests
parent11ec3f9e46334ea8f86df026af8453308c5d5280 (diff)
downloadrt.equinox.bundles-c9e9b24fdb3c5a010cb0350dbc20a611d36f30f9.tar.gz
rt.equinox.bundles-c9e9b24fdb3c5a010cb0350dbc20a611d36f30f9.tar.xz
rt.equinox.bundles-c9e9b24fdb3c5a010cb0350dbc20a611d36f30f9.zip
Convert CRLF to LF line endingsv20111010-1614
Diffstat (limited to 'bundles/org.eclipse.equinox.compendium.tests')
-rw-r--r--bundles/org.eclipse.equinox.compendium.tests/bundles_src/metatype/extendable.tb1/META-INF/MANIFEST.MF16
-rw-r--r--bundles/org.eclipse.equinox.compendium.tests/bundles_src/metatype/extendable.tb1/OSGI-INF/metatype/metadata.xml28
-rw-r--r--bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/ExtendableTest.java130
3 files changed, 87 insertions, 87 deletions
diff --git a/bundles/org.eclipse.equinox.compendium.tests/bundles_src/metatype/extendable.tb1/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.compendium.tests/bundles_src/metatype/extendable.tb1/META-INF/MANIFEST.MF
index 117e03bd2..904e1e44c 100644
--- a/bundles/org.eclipse.equinox.compendium.tests/bundles_src/metatype/extendable.tb1/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.compendium.tests/bundles_src/metatype/extendable.tb1/META-INF/MANIFEST.MF
@@ -1,8 +1,8 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-SymbolicName: metatype.extendable.tb1
-Bundle-Version: 1.0.0
-Import-Package: org.osgi.framework;version="1.3.0",
- org.osgi.service.metatype;version="1.2"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
-
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: metatype.extendable.tb1
+Bundle-Version: 1.0.0
+Import-Package: org.osgi.framework;version="1.3.0",
+ org.osgi.service.metatype;version="1.2"
+Bundle-RequiredExecutionEnvironment: J2SE-1.4
+
diff --git a/bundles/org.eclipse.equinox.compendium.tests/bundles_src/metatype/extendable.tb1/OSGI-INF/metatype/metadata.xml b/bundles/org.eclipse.equinox.compendium.tests/bundles_src/metatype/extendable.tb1/OSGI-INF/metatype/metadata.xml
index 0d8934665..3aa3048bf 100644
--- a/bundles/org.eclipse.equinox.compendium.tests/bundles_src/metatype/extendable.tb1/OSGI-INF/metatype/metadata.xml
+++ b/bundles/org.eclipse.equinox.compendium.tests/bundles_src/metatype/extendable.tb1/OSGI-INF/metatype/metadata.xml
@@ -1,14 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<md:MetaData
- xmlns:md="http://www.org.osgi/xmlns/metatype/v1.2.0/md"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.org.osgi/xmlns/metatype/v1.2.0/md metatype.xsd"
- xmlns:validation="urn:xmlns:validation"
- xmlns:foo="urn:xmlns:foo">
- <OCD id="ocd1" name="ocd1" foo:foo="bar" validation:enabled="true">
- <AD name="ad1" id="ad1" type="String" validation:regexp="[a-zA-Z0-9]" validation:validation="validation" foo:bar="foo"/>
- </OCD>
- <Designate pid="metatype.extendable.tb1.1">
- <Object ocdref="ocd1"/>
- </Designate>
-</md:MetaData>
+<?xml version="1.0" encoding="UTF-8"?>
+<md:MetaData
+ xmlns:md="http://www.org.osgi/xmlns/metatype/v1.2.0/md"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.org.osgi/xmlns/metatype/v1.2.0/md metatype.xsd"
+ xmlns:validation="urn:xmlns:validation"
+ xmlns:foo="urn:xmlns:foo">
+ <OCD id="ocd1" name="ocd1" foo:foo="bar" validation:enabled="true">
+ <AD name="ad1" id="ad1" type="String" validation:regexp="[a-zA-Z0-9]" validation:validation="validation" foo:bar="foo"/>
+ </OCD>
+ <Designate pid="metatype.extendable.tb1.1">
+ <Object ocdref="ocd1"/>
+ </Designate>
+</md:MetaData>
diff --git a/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/ExtendableTest.java b/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/ExtendableTest.java
index fe8b0bef0..d2fe8d408 100644
--- a/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/ExtendableTest.java
+++ b/bundles/org.eclipse.equinox.compendium.tests/src/org/eclipse/equinox/metatype/tests/ExtendableTest.java
@@ -1,65 +1,65 @@
-/*******************************************************************************
- * Copyright (c) 2011 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.equinox.metatype.tests;
-
-import org.eclipse.equinox.metatype.*;
-
-import java.util.Map;
-import java.util.Set;
-import org.osgi.framework.Bundle;
-import org.osgi.service.metatype.ObjectClassDefinition;
-
-public class ExtendableTest extends AbstractTest {
- private Bundle bundle;
-
- protected void setUp() throws Exception {
- super.setUp();
- bundle = bundleInstaller.installBundle("extendable.tb1"); //$NON-NLS-1$
- bundle.start();
- }
-
- public void testExtensions() {
- EquinoxMetaTypeInformation mti = metatype.getMetaTypeInformation(bundle);
- EquinoxObjectClassDefinition ocd = mti.getObjectClassDefinition("metatype.extendable.tb1.1", null); //$NON-NLS-1$
- Set schemas = ocd.getExtensionUris();
- assertNotNull("Null extension schemas", schemas); //$NON-NLS-1$
- assertEquals("Wrong schemas size", 2, schemas.size()); //$NON-NLS-1$
- assertTrue("Missing schema", schemas.contains("urn:xmlns:foo")); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Missing schema", schemas.contains("urn:xmlns:validation")); //$NON-NLS-1$ //$NON-NLS-2$
- Map attributes = ocd.getExtensionAttributes("urn:xmlns:foo"); //$NON-NLS-1$
- assertNotNull("Null attributes", attributes); //$NON-NLS-1$
- assertEquals("Wrong attributes size", 1, attributes.size()); //$NON-NLS-1$
- assertEquals("Wrong value", "bar", attributes.get("foo")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- attributes = ocd.getExtensionAttributes("urn:xmlns:validation"); //$NON-NLS-1$
- assertNotNull("Null attributes", attributes); //$NON-NLS-1$
- assertEquals("Wrong attributes size", 1, attributes.size()); //$NON-NLS-1$
- assertEquals("Wrong value", "true", attributes.get("enabled")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EquinoxAttributeDefinition[] ads = ocd.getAttributeDefinitions(ObjectClassDefinition.ALL);
- for (int i = 0; i < ads.length; i++) {
- if (ads[i].getID().equals("ad1")) { //$NON-NLS-1$
- schemas = ads[i].getExtensionUris();
- assertNotNull("Null extension schemas", schemas); //$NON-NLS-1$
- assertEquals("Wrong schemas size", 2, schemas.size()); //$NON-NLS-1$
- assertTrue("Missing schema", schemas.contains("urn:xmlns:foo")); //$NON-NLS-1$ //$NON-NLS-2$
- assertTrue("Missing schema", schemas.contains("urn:xmlns:validation")); //$NON-NLS-1$ //$NON-NLS-2$
- attributes = ads[i].getExtensionAttributes("urn:xmlns:foo"); //$NON-NLS-1$
- assertNotNull("Null attributes", attributes); //$NON-NLS-1$
- assertEquals("Wrong attributes size", 1, attributes.size()); //$NON-NLS-1$
- assertEquals("Wrong value", "foo", attributes.get("bar")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- attributes = ads[i].getExtensionAttributes("urn:xmlns:validation"); //$NON-NLS-1$
- assertNotNull("Null attributes", attributes); //$NON-NLS-1$
- assertEquals("Wrong attributes size", 2, attributes.size()); //$NON-NLS-1$
- assertEquals("Wrong value", "[a-zA-Z0-9]", attributes.get("regexp")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- assertEquals("Wrong value", "validation", attributes.get("validation")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2011 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.equinox.metatype.tests;
+
+import org.eclipse.equinox.metatype.*;
+
+import java.util.Map;
+import java.util.Set;
+import org.osgi.framework.Bundle;
+import org.osgi.service.metatype.ObjectClassDefinition;
+
+public class ExtendableTest extends AbstractTest {
+ private Bundle bundle;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ bundle = bundleInstaller.installBundle("extendable.tb1"); //$NON-NLS-1$
+ bundle.start();
+ }
+
+ public void testExtensions() {
+ EquinoxMetaTypeInformation mti = metatype.getMetaTypeInformation(bundle);
+ EquinoxObjectClassDefinition ocd = mti.getObjectClassDefinition("metatype.extendable.tb1.1", null); //$NON-NLS-1$
+ Set schemas = ocd.getExtensionUris();
+ assertNotNull("Null extension schemas", schemas); //$NON-NLS-1$
+ assertEquals("Wrong schemas size", 2, schemas.size()); //$NON-NLS-1$
+ assertTrue("Missing schema", schemas.contains("urn:xmlns:foo")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Missing schema", schemas.contains("urn:xmlns:validation")); //$NON-NLS-1$ //$NON-NLS-2$
+ Map attributes = ocd.getExtensionAttributes("urn:xmlns:foo"); //$NON-NLS-1$
+ assertNotNull("Null attributes", attributes); //$NON-NLS-1$
+ assertEquals("Wrong attributes size", 1, attributes.size()); //$NON-NLS-1$
+ assertEquals("Wrong value", "bar", attributes.get("foo")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ attributes = ocd.getExtensionAttributes("urn:xmlns:validation"); //$NON-NLS-1$
+ assertNotNull("Null attributes", attributes); //$NON-NLS-1$
+ assertEquals("Wrong attributes size", 1, attributes.size()); //$NON-NLS-1$
+ assertEquals("Wrong value", "true", attributes.get("enabled")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EquinoxAttributeDefinition[] ads = ocd.getAttributeDefinitions(ObjectClassDefinition.ALL);
+ for (int i = 0; i < ads.length; i++) {
+ if (ads[i].getID().equals("ad1")) { //$NON-NLS-1$
+ schemas = ads[i].getExtensionUris();
+ assertNotNull("Null extension schemas", schemas); //$NON-NLS-1$
+ assertEquals("Wrong schemas size", 2, schemas.size()); //$NON-NLS-1$
+ assertTrue("Missing schema", schemas.contains("urn:xmlns:foo")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Missing schema", schemas.contains("urn:xmlns:validation")); //$NON-NLS-1$ //$NON-NLS-2$
+ attributes = ads[i].getExtensionAttributes("urn:xmlns:foo"); //$NON-NLS-1$
+ assertNotNull("Null attributes", attributes); //$NON-NLS-1$
+ assertEquals("Wrong attributes size", 1, attributes.size()); //$NON-NLS-1$
+ assertEquals("Wrong value", "foo", attributes.get("bar")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ attributes = ads[i].getExtensionAttributes("urn:xmlns:validation"); //$NON-NLS-1$
+ assertNotNull("Null attributes", attributes); //$NON-NLS-1$
+ assertEquals("Wrong attributes size", 2, attributes.size()); //$NON-NLS-1$
+ assertEquals("Wrong value", "[a-zA-Z0-9]", attributes.get("regexp")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ assertEquals("Wrong value", "validation", attributes.get("validation")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+ }
+ }
+}

Back to the top