Пример #1
0
        public void Ex6()
        {
            string input     = "----Lorem     ipsum   dolor sit---";
            var    decorator = new AddParagraph(new RemoveDoubleSpaces(new RemoveDashesAtEdges()));
            string result    = decorator.Transform(input);

            Assert.AreEqual("<p>Lorem ipsum dolor sit</p>", result);
        }
Пример #2
0
        public void Ex3()
        {
            string input     = "----Lorem     ipsum   dolor sit---";
            var    decorator = new AddParagraph();
            string result    = decorator.Transform(input);

            Assert.AreEqual("<p>----Lorem     ipsum   dolor sit---</p>", result);
        }
Пример #3
0
        public void Ex4()
        {
            string input     = "----Lorem     ipsum   dolor sit---";
            var    component = new ConcreteComponent();
            var    decorator = new AddParagraph(new RemoveDashesAtEdges(component));
            string result    = decorator.Transform(input);

            Assert.AreEqual("<p>Lorem     ipsum   dolor sit</p>", result);
        }