This commit was manufactured by cvs2svn to create branch 'R1_0_maintenance'.
diff --git a/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationManagerTest.java b/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationManagerTest.java
new file mode 100644
index 0000000..7c4953e
--- /dev/null
+++ b/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationManagerTest.java
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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.wst.xml.core.internal.validation.errorcustomization;
+
+import junit.framework.TestCase;
+
+import org.eclipse.wst.xml.core.internal.validation.core.ValidationInfo;
+import org.eclipse.wst.xml.core.internal.validation.core.ValidationMessage;
+import org.eclipse.wst.xml.core.internal.validation.errorcustomization.ErrorCustomizationManager.ErrorMessageInformation;
+
+/**
+ * Test the ErrorCustomizationManager class.
+ */
+public class ErrorCustomizationManagerTest extends TestCase
+{
+
+ /**
+ * Test the startElement method with the following tests:
+ * 1. Test that the root element is properly pushed to the stack.
+ * 2. Test that a subsequent element is properly pushed to the stack and
+ * registered as a child element.
+ */
+ public void testStartElement()
+ {
+ // 1. Test that the root element is properly pushed to the stack.
+ String namespace1 = "http://namespace1";
+ String localname1 = "localname";
+ ErrorCustomizationManagerWrapper manager = new ErrorCustomizationManagerWrapper();
+ assertEquals("1. The element information stack is not empty to start.", 0, manager.getElementInformationStack().size());
+ manager.startElement(namespace1, localname1);
+ ElementInformation elemInfo = (ElementInformation)manager.getElementInformationStack().pop();
+ assertEquals("1. The element information stack is not empty to after popping the top element.", 0, manager.getElementInformationStack().size());
+ assertEquals("1. The namespace specified on the element information is not http://namespace1 it is " + elemInfo.getNamespace(), namespace1, elemInfo.getNamespace());
+ assertEquals("1. The local name specified on the element information is not localname it is " + elemInfo.getLocalname(), localname1, elemInfo.getLocalname());
+
+ // 2. Test that a subsequent element is properly pushed to the stack and registered as a child element.
+ String localname2 = "localname2";
+ ErrorCustomizationManagerWrapper manager2 = new ErrorCustomizationManagerWrapper();
+ assertEquals("2. The element information stack is not empty to start.", 0, manager2.getElementInformationStack().size());
+ manager2.startElement(namespace1, localname1);
+ manager2.startElement(namespace1, localname2);
+ assertEquals("2. The element information stack does not contain 2 elements.", 2, manager2.getElementInformationStack().size());
+ ElementInformation elemInfo2 = (ElementInformation)manager2.getElementInformationStack().pop();
+ assertEquals("2. The element information stack does not contain 1 element after popping the top element.", 1, manager2.getElementInformationStack().size());
+ assertEquals("2. The namespace specified on the element information child is not http://namespace1 it is " + elemInfo2.getNamespace(), namespace1, elemInfo2.getNamespace());
+ assertEquals("2. The local name specified on the element information child is not localname2 it is " + elemInfo2.getLocalname(), localname2, elemInfo2.getLocalname());
+ ElementInformation elemInfo3 = (ElementInformation)manager2.getElementInformationStack().pop();
+ assertEquals("2. The element information stack does not contain 0 elements after popping the top element.", 0, manager2.getElementInformationStack().size());
+ assertEquals("2. The namespace specified on the element information is not http://namespace1 it is " + elemInfo3.getNamespace(), namespace1, elemInfo3.getNamespace());
+ assertEquals("2. The local name specified on the element information is not localname it is " + elemInfo3.getLocalname(), localname1, elemInfo3.getLocalname());
+ assertEquals("2. The element information does not contain 1 child element it contains " + elemInfo3.getChildren().size(), 1, elemInfo3.getChildren().size());
+ ElementInformation elemInfo4 = (ElementInformation)elemInfo3.getChildren().get(0);
+ assertEquals("2. The namespace specified on the element information's child is not http://namespace1 it is " + elemInfo4.getNamespace(), namespace1, elemInfo4.getNamespace());
+ assertEquals("2. The local name specified on the element information's child is not localname2 it is " + elemInfo4.getLocalname(), localname2, elemInfo4.getLocalname());
+ }
+
+ /**
+ * Test the endElement method with the following tests:
+ * 1. Check that the last element on the stack is successfully popped.
+ * 2. Test that an element in a sample namespace produces the expected message.
+ * 3. Test that an element not in a sample namespace retains its value.
+ */
+ public void testEndElement()
+ {
+ // 1. Check that the last element on the stack is successfully popped.
+ String namespace1 = "http://namespace1";
+ String localname1 = "localname";
+ ErrorCustomizationManagerWrapper manager = new ErrorCustomizationManagerWrapper();
+ manager.getElementInformationStack().push(new ElementInformation(namespace1, localname1));
+ manager.endElement(namespace1, localname1);
+ assertEquals("1. The stack still contains an element.", 0, manager.getElementInformationStack().size());
+
+ // 2. Test that an element in a sample namespace produces the expected message.
+ String namespace2 = "XMLValidationTestSampleNamespace";
+ ErrorCustomizationRegistry.getInstance().addErrorMessageCustomizer(namespace2, new SampleErrorMessageCustomizer());
+ ErrorCustomizationManagerWrapper manager2 = new ErrorCustomizationManagerWrapper();
+ manager2.getElementInformationStack().push(new ElementInformation(namespace2, localname1));
+ ErrorMessageInformation emi = manager2.new ErrorMessageInformation();
+ emi.message = new ValidationMessage("SampleMessage", 1, 2, namespace2);
+ manager2.setMessageForConsideration(emi);
+ manager2.endElement(namespace2, localname1);
+ assertEquals("2. The message was not customized to AAAA. The message is " + emi.message.getMessage(), "AAAA", emi.message.getMessage());
+
+ // 3. Test that an element not in a sample namespace retains its value.
+ String namespace3 = "XMLValidationTestSampleNamespace3";
+ ErrorCustomizationManagerWrapper manager3 = new ErrorCustomizationManagerWrapper();
+ manager3.getElementInformationStack().push(new ElementInformation(namespace3, localname1));
+ ErrorMessageInformation emi2 = manager3.new ErrorMessageInformation();
+ emi2.message = new ValidationMessage("SampleMessage", 1, 2, namespace3);
+ manager3.setMessageForConsideration(emi2);
+ manager3.endElement(namespace3, localname1);
+ assertEquals("3. The message did not retain its value of SampleMessage. The message is " + emi2.message.getMessage(), "SampleMessage", emi2.message.getMessage());
+ }
+
+ /**
+ * Test the considerReportedError method with the following tests:
+ * 1. Check that the messageForConsideration is not set if there are no current
+ * validation messages.
+ * 2. Check that the messageForConsideration is set correctly if there is a
+ * validation message.
+ */
+ public void testConsiderReportedError()
+ {
+ // 1. Check that the messageForConsideration is not set if there are no current validation messages.
+ String namespace1 = "http://namespace1";
+ ErrorCustomizationManagerWrapper manager = new ErrorCustomizationManagerWrapper();
+ ValidationInfo valinfo = new ValidationInfo(namespace1);
+ manager.considerReportedError(valinfo, "key", null);
+ assertNull("1. The messageForConsideration is not null when no validation messages exist.", manager.getMessageForConsideration());
+
+ // 2. Check that the messageForConsideration is set correctly if there is a validation message.
+ ErrorCustomizationManagerWrapper manager2 = new ErrorCustomizationManagerWrapper();
+ ValidationInfo valinfo2 = new ValidationInfo(namespace1);
+ valinfo2.addError("message", 1, 1, namespace1);
+ manager2.considerReportedError(valinfo2, "key", null);
+ assertNotNull("2. The messageForConsideration is null when a validation message exists.", manager2.getMessageForConsideration());
+ }
+}
diff --git a/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationManagerWrapper.java b/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationManagerWrapper.java
new file mode 100644
index 0000000..68202bc
--- /dev/null
+++ b/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationManagerWrapper.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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.wst.xml.core.internal.validation.errorcustomization;
+
+import java.util.Stack;
+
+/**
+ * A wrapper for class ErrorCustomizationManager to facilitate testing.
+ */
+public class ErrorCustomizationManagerWrapper extends ErrorCustomizationManager
+{
+ /**
+ * Get the element information stack.
+ *
+ * @return
+ * The element information stack.
+ */
+ public Stack getElementInformationStack()
+ {
+ return elementInformationStack;
+ }
+
+ /**
+ * Get the current message for consideration.
+ *
+ * @return
+ * The current message for consideration.
+ */
+ public ErrorMessageInformation getMessageForConsideration()
+ {
+ return messageForConsideration;
+ }
+
+ /**
+ * Set the current message for consideration.
+ *
+ * @param message
+ * The current message for consideration.
+ */
+ public void setMessageForConsideration(ErrorMessageInformation message)
+ {
+ messageForConsideration = message;
+ }
+}
diff --git a/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationRegistryTest.java b/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationRegistryTest.java
new file mode 100644
index 0000000..bb03412
--- /dev/null
+++ b/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationRegistryTest.java
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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.wst.xml.core.internal.validation.errorcustomization;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests for the ErrorCustomizationRegistry class.
+ */
+public class ErrorCustomizationRegistryTest extends TestCase
+{
+ private ErrorCustomizationRegistry registry = null;
+
+ /* (non-Javadoc)
+ * @see junit.framework.TestCase#setUp()
+ */
+ protected void setUp() throws Exception
+ {
+ registry = new ErrorCustomizationRegistryWrapper();
+ super.setUp();
+ }
+
+ /**
+ * Test the AddErrorMessageCustomizerToRegistry method with the following tests:
+ * 1. Test that adding an error customizer for a namespace is successful.
+ * 2. Test that adding two error customizers for a namespace returns both customizers.
+ * 3. Test that adding an entry with a null namespace adds the entry for the empty string
+ * namespace.
+ */
+ public void testAddErrorMessageCustomizerToRegistry()
+ {
+ // 1. Test that adding an error customizer for a namespace is successful.
+ String namespace1 = "http://namespace1";
+ IErrorMessageCustomizer customizer = new IErrorMessageCustomizer(){
+ public String customizeMessage(ElementInformation elementInfo, String errorKey, Object[] arguments)
+ {
+ // This stub for testing does not require an implementation.
+ return null;
+ }
+ };
+ registry.addErrorMessageCustomizer(namespace1, customizer);
+ IErrorMessageCustomizer[] registeredCustomizers = registry.getCustomizers(namespace1);
+ assertEquals("1. There should only be 1 customizer registered for the namespace but there are " + registeredCustomizers.length, 1, registeredCustomizers.length);
+ assertEquals("1. The IErrorMessageCustomizer returned is not the same one registered.", customizer, registeredCustomizers[0]);
+
+ // 2. Test that adding two error customizers for a namespace returns both customizers.
+ IErrorMessageCustomizer customizer2 = new IErrorMessageCustomizer(){
+ public String customizeMessage(ElementInformation elementInfo, String errorKey, Object[] arguments)
+ {
+ // This stub for testing does not require an implementation.
+ return null;
+ }
+ };
+ registry.addErrorMessageCustomizer(namespace1, customizer2);
+ registeredCustomizers = registry.getCustomizers(namespace1);
+ assertEquals("2. There should be 2 customizers registered for the namespace but there are " + registeredCustomizers.length, 2, registeredCustomizers.length);
+ assertEquals("2. The first IErrorMessageCustomizer returned is not the same one registered.", customizer, registeredCustomizers[0]);
+ assertEquals("2. The second IErrorMessageCustomizer returned is not the same one registered.", customizer2, registeredCustomizers[1]);
+
+ // 3. Test that adding an entry with a null namespace adds the entry for the empty string namespace.
+ registry.addErrorMessageCustomizer(null, customizer);
+ registeredCustomizers = registry.getCustomizers("");
+ assertEquals("3. There should be 1 customizers registered for the namespace but there are " + registeredCustomizers.length, 1, registeredCustomizers.length);
+ assertEquals("3. The IErrorMessageCustomizer returned is not the same one registered.", customizer, registeredCustomizers[0]);
+ }
+
+ /**
+ * Test the getCustomizers method with the following tests:
+ * 1. Test that requesting an error customizer array for a namespace that has not been
+ * registered produces an empty array.
+ * 2. Test that requesting an error customizer array for the null namespace returns the
+ * one registered customizer.
+ * 3. Test that requesting an error customizer array for the empty string namespace returns
+ * the one registered customizer.
+ */
+ public void testGetCustomizers()
+ {
+ // 1. Test that requesting an error customizer list for a namespace that has not been
+ // registered produces an empty list.
+ IErrorMessageCustomizer[] customizers = registry.getCustomizers("http://nonregisterednamespace");
+ assertEquals("1. The array of customizers for an unregistered namespace is not empty.", 0, customizers.length);
+
+ // 2. Test that requesting an error customizer array for the null namespace returns the
+ // one registered customizer.
+ IErrorMessageCustomizer customizer = new IErrorMessageCustomizer(){
+ public String customizeMessage(ElementInformation elementInfo, String errorKey, Object[] arguments)
+ {
+ // This stub for testing does not require an implementation.
+ return null;
+ }
+ };
+ registry.addErrorMessageCustomizer(null, customizer);
+ customizers = registry.getCustomizers(null);
+ assertEquals("2. The array of customizers for a registered customizer for the null namespace does not contain 1 customizer.", 1, customizers.length);
+ assertEquals("2. The customizer for the null namespace was not successfully returned.", customizer, customizers[0]);
+
+ // 3. Test that requesting an error customizer array for the empty string namespace returns
+ // the one registered customizer for the null namespace.
+ customizers = registry.getCustomizers("");
+ assertEquals("3. The array of customizers for a registered customizer for the null namespace does not contain 1 customizer for the empty string namespace.", 1, customizers.length);
+ assertEquals("3. The customizer for the empty string namespace was not successfully returned.", customizer, customizers[0]);
+ }
+
+}
diff --git a/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationRegistryWrapper.java b/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationRegistryWrapper.java
new file mode 100644
index 0000000..2e02d73
--- /dev/null
+++ b/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationRegistryWrapper.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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.wst.xml.core.internal.validation.errorcustomization;
+
+/**
+ * A wrapper for the ErrorCustomizationRegistry class to allow for testing.
+ */
+public class ErrorCustomizationRegistryWrapper extends ErrorCustomizationRegistry
+{
+ /**
+ * Public constructor.
+ */
+ public ErrorCustomizationRegistryWrapper()
+ {
+ super();
+ }
+
+}
diff --git a/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorMessageCustomizerDelegateTest.java b/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorMessageCustomizerDelegateTest.java
new file mode 100644
index 0000000..24f7e49
--- /dev/null
+++ b/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorMessageCustomizerDelegateTest.java
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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.wst.xml.core.internal.validation.errorcustomization;
+
+import junit.framework.TestCase;
+
+import org.eclipse.wst.xml.validation.tests.internal.XMLValidatorTestsPlugin;
+
+/**
+ * Test the ErrorMessageCustomizerDelegate class.
+ */
+public class ErrorMessageCustomizerDelegateTest extends TestCase
+{
+ /**
+ * Test the loadCustomizer method with the following tests:
+ * 1. Test that a valid bundle a class succeeds.
+ * 2. Test that an invalid class fails and keeps the customizer set to null.
+ * 3. Test that a null bundle fails and keeps the customizer set to null.
+ */
+ public void testLoadCustomizer()
+ {
+ // 1. Test that a valid bundle a class succeeds.
+ ErrorMessageCustomizerDelegateWrapper delegate = new ErrorMessageCustomizerDelegateWrapper(XMLValidatorTestsPlugin.getPlugin().getBundle(), "org.eclipse.wst.xml.core.internal.validation.errorcustomization.SampleErrorMessageCustomizer");
+ delegate.loadCustomizer();
+ assertNotNull("1. The customizer loaded was null for a valid customizer and bundle.", delegate.getCustomizer());
+
+ // 2. Test that an invalid class fails and keeps the customizer set to null.
+ ErrorMessageCustomizerDelegateWrapper delegate2 = new ErrorMessageCustomizerDelegateWrapper(XMLValidatorTestsPlugin.getPlugin().getBundle(), "org.eclipse.wst.xml.core.internal.validation.errorcustomization.NonexistantErrorMessageCustomizer");
+ delegate2.loadCustomizer();
+ assertNull("2. The customizer loaded was not null for an invalid customizer class.", delegate2.getCustomizer());
+
+ // 3. Test that a null bundle fails and keeps the customizer set to null.
+ ErrorMessageCustomizerDelegateWrapper delegate3 = new ErrorMessageCustomizerDelegateWrapper(null, "org.eclipse.wst.xml.core.internal.validation.errorcustomization.SampleErrorMessageCustomizer");
+ delegate3.loadCustomizer();
+ assertNull("3. The customizer loaded was not null for a null bundle.", delegate3.getCustomizer());
+ }
+
+ /**
+ * Test the customizeMessage method with the following tests:
+ * 1. Test that the message returned is correct for a valid customizer.
+ * 2. Test that the message returned is null for an invalid customizer class.
+ */
+ public void testCustomizeMessage()
+ {
+ // 1. Test that the message returned is correct for a valid customizer.
+ ErrorMessageCustomizerDelegateWrapper delegate = new ErrorMessageCustomizerDelegateWrapper(XMLValidatorTestsPlugin.getPlugin().getBundle(), "org.eclipse.wst.xml.core.internal.validation.errorcustomization.SampleErrorMessageCustomizer");
+ String message = delegate.customizeMessage(null, null, null);
+ assertEquals("1. The message returned was not AAAA.", "AAAA", message);
+
+ // 2. Test that the message returned is null for an invalid customizer class.
+ ErrorMessageCustomizerDelegateWrapper delegate2 = new ErrorMessageCustomizerDelegateWrapper(XMLValidatorTestsPlugin.getPlugin().getBundle(), "org.eclipse.wst.xml.core.internal.validation.errorcustomization.NonexistantErrorMessageCustomizer");
+ message = delegate2.customizeMessage(null, null, null);
+ assertNull("2. The message returned was not null for an invalid customizer.", message);
+ }
+}
diff --git a/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorMessageCustomizerDelegateWrapper.java b/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorMessageCustomizerDelegateWrapper.java
new file mode 100644
index 0000000..eb87161
--- /dev/null
+++ b/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorMessageCustomizerDelegateWrapper.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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.wst.xml.core.internal.validation.errorcustomization;
+
+import org.osgi.framework.Bundle;
+
+/**
+ * A wrapper of the class ErrorMessageCustomizerDelegate to facilitate testing.
+ */
+public class ErrorMessageCustomizerDelegateWrapper extends ErrorMessageCustomizerDelegate
+{
+ /**
+ * Constructor.
+ */
+ public ErrorMessageCustomizerDelegateWrapper(Bundle bundle, String classname)
+ {
+ super(bundle, classname);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.xml.core.internal.validation.errorcustomization.ErrorMessageCustomizerDelegate#loadCustomizer()
+ */
+ public void loadCustomizer()
+ {
+ super.loadCustomizer();
+ }
+
+ public IErrorMessageCustomizer getCustomizer()
+ {
+ return customizer;
+ }
+
+}
diff --git a/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/SampleErrorMessageCustomizer.java b/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/SampleErrorMessageCustomizer.java
new file mode 100644
index 0000000..7b61828
--- /dev/null
+++ b/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/core/internal/validation/errorcustomization/SampleErrorMessageCustomizer.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2006 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.wst.xml.core.internal.validation.errorcustomization;
+
+/**
+ * A sample error message customizer for testing. This customizer has a simple
+ * implementation that simple returns the string "AAAA".
+ */
+public class SampleErrorMessageCustomizer implements IErrorMessageCustomizer {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.xml.core.internal.validation.errorcustomization.IErrorMessageCustomizer#customizeMessage(org.eclipse.wst.xml.core.internal.validation.errorcustomization.ElementInformation, java.lang.String, java.lang.Object[])
+ */
+ public String customizeMessage(ElementInformation elementInfo,
+ String errorKey, Object[] arguments) {
+ // TODO Auto-generated method stub
+ return "AAAA";
+ }
+
+}