public void FileColonTripleSlashUrlRemovedFromSchemaObjectFileName()
        {
            XmlSchema schemaObject = new XmlSchema();

            schemaObject.SourceUri = @"file:///d:\schemas\test.xsd";
            XmlSchemaObjectLocation location = new XmlSchemaObjectLocation(schemaObject);

            Assert.AreEqual(@"d:\schemas\test.xsd", location.FileName);
        }
        public void SchemaLocationFileNameIsEmptyStringIfSchemaObjectFileNameIsNull()
        {
            XmlSchema schemaObject = new XmlSchema();

            schemaObject.SourceUri = null;
            XmlSchemaObjectLocation location = new XmlSchemaObjectLocation(schemaObject);

            Assert.AreEqual(String.Empty, location.FileName);
        }
        public override void FixtureInit()
        {
            XmlSchemaCompletionCollection schemas = new XmlSchemaCompletionCollection();

            schemas.Add(SchemaCompletion);

            string xml   = "<note xmlns='http://www.w3schools.com'></note>";
            int    index = xml.IndexOf("note xmlns");

            XmlSchemaDefinition schemaDefinition = new XmlSchemaDefinition(schemas, null);

            schemaElement = (XmlSchemaElement)schemaDefinition.GetSelectedSchemaObject(xml, index);
            location      = schemaDefinition.GetSelectedSchemaObjectLocation(xml, index);
        }