Example #1
0
        public void TestTagAndSource()
        {
            TestTagTemplate data   = GadgetTestData.TagTemplates.SimpleTemplate;
            OsTagTemplate   target = new OsTagTemplate();

            //			OsTagTemplate target = new OsTagTemplate(data.Tag, data.Source, TEST_FACTORY_KEY);
            target.MyRootMaster.MyControlFactory = ControlFactory.GetControlFactory(TEST_FACTORY_KEY);
            target.LoadTag(data.Source);

            Assert.AreEqual(data.Source, target.RawTag);
        }
Example #2
0
        public void TestTagParse()
        {
            TestTagTemplate data   = GadgetTestData.TagTemplates.SimpleTemplate;
            OsTagTemplate   target = new OsTagTemplate();

            target.MyRootMaster.MyControlFactory = ControlFactory.GetControlFactory(TEST_FACTORY_KEY);
            target.LoadTag(data.Source);

            Assert.AreEqual(data.Tag, target.Tag);
            CustomTagFactory fact = new CustomTagFactory();

            fact.RegisterCustomTag(target);

            CustomTag result = fact.CreateTagInstance(data.Tag);

            Assert.AreEqual(data.Tag, result.MarkupTag);

            Assert.AreEqual("my", target.Prefix);
            Assert.AreEqual("Thing", target.LocalTag);
        }