Пример #1
0
 public void CheckPassThroughOfContentNoXmlEscaping()
 {
     var tag = new Marker();
     tag.Id = new TemplateAttribute(new ParsedTemplate(new FileBasedResourceLocator(), new ExpressionPart(new Constant("id"))));
     tag.Body = new TemplateAttribute(new ParsedTemplate(new FileBasedResourceLocator(), new ExpressionPart(new Constant("body&body"))));
     Assert.That(tag.Evaluate(new TagModel(this)), Is.EqualTo("body&body"));
 }
Пример #2
0
        public void CheckMarkerRequired()
        {
            var tag = new Marker();
            try
            {
                RequiredAttribute.Check(tag);
                Assert.Fail("Expected exception");
            }
            catch (TagException Te)
            {
                Assert.That(Te.Message, Is.EqualTo(TagException.MissingRequiredAttribute(typeof (Marker), "Id").Message));
            }

            tag.Id = new TemplateAttribute(new ParsedTemplate(new FileBasedResourceLocator(), new ExpressionPart(new Constant("id"))));
            RequiredAttribute.Check(tag);
        }
Пример #3
0
 public void CheckNoBody()
 {
     var tag = new Marker();
     tag.Id = new TemplateAttribute(new ParsedTemplate(new FileBasedResourceLocator(), new ExpressionPart(new Constant("id"))));
     Assert.That(tag.Evaluate(new TagModel(this)), Is.EqualTo(String.Empty));
 }