//
//
//
//
// $Revision$
//
using System;
using ICSharpCode.SharpDevelop.Editor.CodeCompletion;
using ICSharpCode.XmlEditor;
using NUnit.Framework;
namespace XmlEditor.Tests.Schema
{
///
/// Tests that the completion data retrieves the annotation documentation
/// that an element ref may have.
///
[TestFixture]
public class ElementRefAnnotationTestFixture : SchemaTestFixtureBase
{
XmlCompletionItemCollection fooChildElementCompletion;
public override void FixtureInit()
{
XmlElementPath path = new XmlElementPath();
path.AddElement(new QualifiedName("foo", "http://foo.com"));
fooChildElementCompletion = SchemaCompletion.GetChildElementCompletion(path);
}
[Test]
public void BarElementDocumentation()
{
Assert.IsTrue(fooChildElementCompletion.ContainsDescription("bar", "Documentation for bar element."),
"Missing documentation for bar element");
}
protected override string GetSchema()
{
return "\r\n" +
"\t\r\n" +
"\t\t\r\n" +
"\t\t\t\r\n" +
"\t\t\t\t\r\n" +
"\t\t\t\r\n" +
"\t\t\r\n" +
"\t\r\n" +
"\r\n" +
"\t\r\n" +
"\t\t\r\n" +
"\t\t\tDocumentation for bar element.\r\n" +
"\t\t\r\n" +
"\t\t\r\n" +
"\t\t\t\r\n" +
"\t\t\r\n" +
"\t\r\n" +
"";
}
}
}