public void TextElementAttributeName() { CompletionDataList attributesCompletionData = SchemaCompletionData.GetAttributeCompletionData(textElementPath); Assert.IsTrue(SchemaTestFixtureBase.Contains(attributesCompletionData, "foo"), "Unexpected text attribute name."); }
public async Task TextElementAttributeName() { CompletionDataList attributesCompletionData = await SchemaCompletionData.GetAttributeCompletionData(textElementPath, CancellationToken.None); Assert.IsTrue(SchemaTestFixtureBase.Contains(attributesCompletionData, "foo"), "Unexpected text attribute name."); }
public override void FixtureInit() { XmlElementPath path = new XmlElementPath(); path.Elements.Add(new QualifiedName("html", "http://foo/xhtml")); attributes = SchemaCompletionData.GetAttributeCompletionData(path); }
public override void FixtureInit() { XmlElementPath path = new XmlElementPath(); path.Elements.Add(new QualifiedName("schema", "http://www.w3.org/2001/XMLSchema")); schemaChildElements = SchemaCompletionData.GetChildElementCompletionData(path); schemaAttributes = SchemaCompletionData.GetAttributeCompletionData(path); // Get include elements attributes. path.Elements.Add(new QualifiedName("include", "http://www.w3.org/2001/XMLSchema")); includeAttributes = SchemaCompletionData.GetAttributeCompletionData(path); // Get annotation element info. path.Elements.RemoveLast(); path.Elements.Add(new QualifiedName("annotation", "http://www.w3.org/2001/XMLSchema")); annotationChildElements = SchemaCompletionData.GetChildElementCompletionData(path); annotationAttributes = SchemaCompletionData.GetAttributeCompletionData(path); // Get app info attributes. path.Elements.Add(new QualifiedName("appinfo", "http://www.w3.org/2001/XMLSchema")); appInfoAttributes = SchemaCompletionData.GetAttributeCompletionData(path); // Get foo attributes. path = new XmlElementPath(); path.Elements.Add(new QualifiedName("foo", "http://www.w3.org/2001/XMLSchema")); fooAttributes = SchemaCompletionData.GetAttributeCompletionData(path); }
public void TextElementHasOneAttribute() { ICompletionData[] attributesCompletionData = SchemaCompletionData.GetAttributeCompletionData(textElementPath); Assert.AreEqual(1, attributesCompletionData.Length, "Should have 1 text attribute."); }
public async Task TextElementHasOneAttribute() { CompletionDataList attributesCompletionData = await SchemaCompletionData.GetAttributeCompletionData(textElementPath, CancellationToken.None); Assert.AreEqual(1, attributesCompletionData.Count, "Should have 1 text attribute."); }
public override void FixtureInit() { XmlElementPath path = new XmlElementPath(); path.Elements.Add(new QualifiedName("note", "http://www.w3schools.com")); attributeCompletionData = SchemaCompletionData.GetAttributeCompletionData(path); }
public async Task NoteElementHasNoAttributes() { CompletionDataList attributeCompletionData = await SchemaCompletionData.GetAttributeCompletionData(noteElementPath, CancellationToken.None); Assert.AreEqual(0, attributeCompletionData.Count, "Should no attributes."); }
public void NoteElementHasNoAttributes() { CompletionDataList attributeCompletionData = SchemaCompletionData.GetAttributeCompletionData(noteElementPath); Assert.AreEqual(0, attributeCompletionData.Count, "Should no attributes."); }
public void NoteElementHasNoAttributes() { ICompletionData[] attributeCompletionData = SchemaCompletionData.GetAttributeCompletionData(noteElementPath); Assert.AreEqual(0, attributeCompletionData.Length, "Should no attributes."); }
public void NoAttributesForUnknownElement() { XmlElementPath path = new XmlElementPath(); path.Elements.Add(new QualifiedName("foobar", "http://www.w3schools.com")); CompletionDataList attributes = SchemaCompletionData.GetAttributeCompletionData(path); Assert.AreEqual(0, attributes.Count, "Should not find attributes for unknown element."); }
public override void FixtureInit() { XmlElementPath path = new XmlElementPath(); path.Elements.Add(new QualifiedName("project", "http://nant.sf.net//nant-0.84.xsd")); path.Elements.Add(new QualifiedName("attrib", "http://nant.sf.net//nant-0.84.xsd")); attributes = SchemaCompletionData.GetAttributeCompletionData(path); }
public async Task NoAttributesForUnknownElement() { await Init(); XmlElementPath path = new XmlElementPath(); path.Elements.Add(new QualifiedName("foobar", "http://www.w3schools.com")); CompletionDataList attributes = await SchemaCompletionData.GetAttributeCompletionData(path, CancellationToken.None); Assert.AreEqual(0, attributes.Count, "Should not find attributes for unknown element."); }
public override void FixtureInit() { XmlElementPath path = new XmlElementPath(); path.Elements.Add(new QualifiedName("person", "http://foo")); personElementChildren = SchemaCompletionData.GetChildElementCompletionData(path); path.Elements.Add(new QualifiedName("firstname", "http://foo")); firstNameAttributes = SchemaCompletionData.GetAttributeCompletionData(path); firstNameElementChildren = SchemaCompletionData.GetChildElementCompletionData(path); }
async Task Init() { if (attributes != null) { return; } XmlElementPath path = new XmlElementPath(); path.Elements.Add(new QualifiedName("html", "http://foo/xhtml")); attributes = await SchemaCompletionData.GetAttributeCompletionData(path, CancellationToken.None); }
async Task Init() { if (attributeCompletionData != null) { return; } XmlElementPath path = new XmlElementPath(); path.Elements.Add(new QualifiedName("note", "http://www.w3schools.com")); attributeCompletionData = await SchemaCompletionData.GetAttributeCompletionData(path, CancellationToken.None); }
public override void FixtureInit() { XmlElementPath path = new XmlElementPath(); path.Elements.Add(new QualifiedName("foo", "http://foo.com")); fooAttributeCompletionData = SchemaCompletionData.GetAttributeCompletionData(path); path.Elements.Add(new QualifiedName("bar", "http://foo.com")); barAttributeCompletionData = SchemaCompletionData.GetAttributeCompletionData(path); }
public override void FixtureInit() { XmlElementPath path = new XmlElementPath(); path.Elements.Add(new QualifiedName("root", "http://foo")); rootChildElements = SchemaCompletionData.GetChildElementCompletionData(path); path.Elements.Add(new QualifiedName("foo", "http://foo")); fooAttributes = SchemaCompletionData.GetAttributeCompletionData(path); }
async Task Init() { if (attributes != null) { return; } XmlElementPath path = new XmlElementPath(); path.Elements.Add(new QualifiedName("project", "http://nant.sf.net//nant-0.84.xsd")); path.Elements.Add(new QualifiedName("attrib", "http://nant.sf.net//nant-0.84.xsd")); attributes = await SchemaCompletionData.GetAttributeCompletionData(path, CancellationToken.None); }
public override void FixtureInit() { XmlElementPath path = new XmlElementPath(); path.Elements.Add(new QualifiedName("project", "http://foo")); path.Elements.Add(new QualifiedName("items", "http://foo")); itemsElementChildren = SchemaCompletionData.GetChildElementCompletionData(path); path.Elements.Add(new QualifiedName("file", "http://foo")); fileElementAttributes = SchemaCompletionData.GetAttributeCompletionData(path); fileElementChildren = SchemaCompletionData.GetChildElementCompletionData(path); }
async Task Init() { if (fooAttributeCompletionData != null) { return; } XmlElementPath path = new XmlElementPath(); path.Elements.Add(new QualifiedName("foo", "http://foo.com")); fooAttributeCompletionData = await SchemaCompletionData.GetAttributeCompletionData(path, CancellationToken.None); path.Elements.Add(new QualifiedName("bar", "http://foo.com")); barAttributeCompletionData = await SchemaCompletionData.GetAttributeCompletionData(path, CancellationToken.None); }
async Task Init() { if (rootChildElements != null) { return; } XmlElementPath path = new XmlElementPath(); path.Elements.Add(new QualifiedName("root", "http://foo")); rootChildElements = await SchemaCompletionData.GetChildElementCompletionData(path, CancellationToken.None); path.Elements.Add(new QualifiedName("foo", "http://foo")); fooAttributes = await SchemaCompletionData.GetAttributeCompletionData(path, CancellationToken.None); }
public override void FixtureInit() { XmlElementPath path = new XmlElementPath(); path.Elements.Add(new QualifiedName("group", "http://www.w3.org/2001/XMLSchema")); childElements = SchemaCompletionData.GetChildElementCompletionData(path); attributes = SchemaCompletionData.GetAttributeCompletionData(path); // Get annotation child elements. path.Elements.Add(new QualifiedName("annotation", "http://www.w3.org/2001/XMLSchema")); annotationChildElements = SchemaCompletionData.GetChildElementCompletionData(path); // Get choice child elements. path.Elements.RemoveLast(); path.Elements.Add(new QualifiedName("choice", "http://www.w3.org/2001/XMLSchema")); choiceChildElements = SchemaCompletionData.GetChildElementCompletionData(path); }
async Task Init() { if (personElementChildren != null) { return; } var path = new XmlElementPath(); path.Elements.Add(new QualifiedName("person", "http://foo")); personElementChildren = await SchemaCompletionData.GetChildElementCompletionData(path, CancellationToken.None); path.Elements.Add(new QualifiedName("firstname", "http://foo")); firstNameAttributes = await SchemaCompletionData.GetAttributeCompletionData(path, CancellationToken.None); firstNameElementChildren = await SchemaCompletionData.GetChildElementCompletionData(path, CancellationToken.None); }
public override void FixtureInit() { // Get shipto attributes. shipToPath = new XmlElementPath(); QualifiedName shipOrderName = new QualifiedName("shiporder", "http://www.w3schools.com"); shipToPath.Elements.Add(shipOrderName); shipToPath.Elements.Add(new QualifiedName("shipto", "http://www.w3schools.com")); shipToAttributes = SchemaCompletionData.GetAttributeCompletionData(shipToPath); // Get shiporder attributes. shipOrderPath = new XmlElementPath(); shipOrderPath.Elements.Add(shipOrderName); shipOrderAttributes = SchemaCompletionData.GetAttributeCompletionData(shipOrderPath); }
async Task Init() { if (fileElementAttributes != null) { return; } var path = new XmlElementPath(); path.Elements.Add(new QualifiedName("project", "http://foo")); path.Elements.Add(new QualifiedName("items", "http://foo")); itemsElementChildren = await SchemaCompletionData.GetChildElementCompletionData(path, CancellationToken.None); path.Elements.Add(new QualifiedName("file", "http://foo")); fileElementAttributes = await SchemaCompletionData.GetAttributeCompletionData(path, CancellationToken.None); fileElementChildren = await SchemaCompletionData.GetChildElementCompletionData(path, CancellationToken.None); }
async Task Init() { if (shipOrderAttributes != null) { return; } // Get shipto attributes. shipToPath = new XmlElementPath(); QualifiedName shipOrderName = new QualifiedName("shiporder", "http://www.w3schools.com"); shipToPath.Elements.Add(shipOrderName); shipToPath.Elements.Add(new QualifiedName("shipto", "http://www.w3schools.com")); shipToAttributes = await SchemaCompletionData.GetAttributeCompletionData(shipToPath, CancellationToken.None); // Get shiporder attributes. shipOrderPath = new XmlElementPath(); shipOrderPath.Elements.Add(shipOrderName); shipOrderAttributes = await SchemaCompletionData.GetAttributeCompletionData(shipOrderPath, CancellationToken.None); }
async Task Init() { if (childElements != null) { return; } XmlElementPath path = new XmlElementPath(); path.Elements.Add(new QualifiedName("group", "http://www.w3.org/2001/XMLSchema")); childElements = await SchemaCompletionData.GetChildElementCompletionData(path, CancellationToken.None); attributes = await SchemaCompletionData.GetAttributeCompletionData(path, CancellationToken.None); // Get annotation child elements. path.Elements.Add(new QualifiedName("annotation", "http://www.w3.org/2001/XMLSchema")); annotationChildElements = await SchemaCompletionData.GetChildElementCompletionData(path, CancellationToken.None); // Get choice child elements. path.Elements.RemoveAt(path.Elements.Count - 1); path.Elements.Add(new QualifiedName("choice", "http://www.w3.org/2001/XMLSchema")); choiceChildElements = await SchemaCompletionData.GetChildElementCompletionData(path, CancellationToken.None); }
async Task Init() { if (schemaChildElements != null) { return; } XmlElementPath path = new XmlElementPath(); path.Elements.Add(new QualifiedName("schema", "http://www.w3.org/2001/XMLSchema")); schemaChildElements = await SchemaCompletionData.GetChildElementCompletionData(path, CancellationToken.None); //schemaAttributes = SchemaCompletionData.GetAttributeCompletionData(path); // Get include elements attributes. path.Elements.Add(new QualifiedName("include", "http://www.w3.org/2001/XMLSchema")); includeAttributes = await SchemaCompletionData.GetAttributeCompletionData(path, CancellationToken.None); // Get annotation element info. path.Elements.RemoveAt(path.Elements.Count - 1); path.Elements.Add(new QualifiedName("annotation", "http://www.w3.org/2001/XMLSchema")); annotationChildElements = await SchemaCompletionData.GetChildElementCompletionData(path, CancellationToken.None); annotationAttributes = await SchemaCompletionData.GetAttributeCompletionData(path, CancellationToken.None); // Get app info attributes. path.Elements.Add(new QualifiedName("appinfo", "http://www.w3.org/2001/XMLSchema")); appInfoAttributes = await SchemaCompletionData.GetAttributeCompletionData(path, CancellationToken.None); // Get foo attributes. path = new XmlElementPath(); path.Elements.Add(new QualifiedName("foo", "http://www.w3.org/2001/XMLSchema")); fooAttributes = await SchemaCompletionData.GetAttributeCompletionData(path, CancellationToken.None); }