Example #1
0
        public void BuildDynamicWithKnownTagReturnsNewHandler()
        {
            var factory = new TagHandlerFactory(Engine);
            var parameters = BuildTagHandlerParameters("<srai>Testing Rocks</srai>");
            var result = factory.BuildTagHandlerDynamic("srai", parameters);

            Assert.IsNotNull(result);

            var handler = (RedirectTagHandler)result;
            Assert.AreEqual("Testing Rocks", handler.Contents);
        }
Example #2
0
        public void BuildDynamicWithUnknownTagReturnsNull()
        {
            var factory = new TagHandlerFactory(Engine);
            var result = factory.BuildTagHandlerDynamic("Unknown",
                                                        BuildTagHandlerParameters("<unknown />"));

            Assert.IsNull(result);
        }
Example #3
0
 public void BuildDynamicWithNullTagThrowsException()
 {
     var factory = new TagHandlerFactory(Engine);
     var parameters = BuildTagHandlerParameters("<Foo />");
     factory.BuildTagHandlerDynamic(null, parameters);
 }
Example #4
0
 public void BuildDynamicWithNullParametersThrowsException()
 {
     var factory = new TagHandlerFactory(Engine);
     factory.BuildTagHandlerDynamic("Foo", null);
 }