Esempio n. 1
0
        public void RegistersComponentTypes()
        {
            var xml = new XElement(Ns.Document + "definitions",
                                   new XElement(Ns.Document + "src",
                                                new XAttribute("col", "http://component/collection"),
                                                new XElement(Ns.Document + "add",
                                                             new XAttribute("id", "0"),
                                                             new XAttribute("item", "component"))));

            reader.ReadDefinitions(document, xml, context);

            Assert.That(context.Warnings, Is.Empty);
            Assert.That(context.GetComponentType("0"), Is.Not.Null);
            Assert.That(context.GetComponentType("0").CollectionItem, Is.EqualTo("component"));
        }