Inheritance: IGetSummaryProcessor
示例#1
0
        public void EmptySummary()
        {
            var processor = new Wrap();
            processor.OnlyWhenRequired = true;
            processor.WrappingTag = "p";

            var args = new GetSummaryArgs();
            args.Summary = string.Empty;

            processor.Process(args);

            Assert.AreEqual("<p></p>", args.Summary);
        }
示例#2
0
        public void Unwrapped_OnlyRequiredWrap()
        {
            var processor = new Wrap();
            processor.OnlyWhenRequired = true;
            processor.WrappingTag = "span";

            var args = new GetSummaryArgs();
            args.Summary = "lorem ipsum";

            processor.Process(args);

            Assert.AreEqual("<span>lorem ipsum</span>", args.Summary);
        }
示例#3
0
        public void AlreadyWrapped_AlwaysWrap()
        {
            var processor = new Wrap();
            processor.OnlyWhenRequired = false;
            processor.WrappingTag = "span";

            var args = new GetSummaryArgs();
            args.Summary = "<span>lorem ipsum</span>";

            processor.Process(args);

            Assert.AreEqual("<span><span>lorem ipsum</span></span>", args.Summary);
        }