2
using MonoDevelop.Ide.CodeCompletion;
3
using MonoDevelop.XmlEditor;
9
namespace MonoDevelop.XmlEditor.Tests.Schema
12
/// Tests that the completion data retrieves the annotation documentation
13
/// that an element ref may have.
16
public class ElementRefAnnotationTestFixture : SchemaTestFixtureBase
18
ICompletionData[] fooChildElementCompletionData;
20
public override void FixtureInit()
22
XmlElementPath path = new XmlElementPath();
23
path.Elements.Add(new QualifiedName("foo", "http://foo.com"));
25
fooChildElementCompletionData = SchemaCompletionData.GetChildElementCompletionData(path);
29
public void BarElementDocumentation()
31
Assert.IsTrue(SchemaTestFixtureBase.ContainsDescription(fooChildElementCompletionData, "bar", "Documentation for bar element."),
32
"Missing documentation for bar element");
35
protected override string GetSchema()
37
return "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"http://foo.com\" xmlns=\"http://foo.com\">\r\n" +
38
"\t<xs:element name=\"foo\">\r\n" +
39
"\t\t<xs:complexType>\r\n" +
40
"\t\t\t<xs:sequence>\r\n" +
41
"\t\t\t\t<xs:element ref=\"bar\"/>\r\n" +
42
"\t\t\t</xs:sequence>\r\n" +
43
"\t\t</xs:complexType>\r\n" +
44
"\t</xs:element>\r\n" +
46
"\t<xs:element name=\"bar\">\r\n" +
47
"\t\t<xs:annotation>\r\n" +
48
"\t\t\t<xs:documentation>Documentation for bar element.</xs:documentation>\r\n" +
49
"\t\t</xs:annotation>\r\n" +
50
"\t\t<xs:complexType>\r\n" +
51
"\t\t\t<xs:attribute name=\"id\"/>\r\n" +
52
"\t\t</xs:complexType>\r\n" +
53
"\t</xs:element>\r\n" +