Ejemplo n.º 1
0
        public void GivenInsertPlaceholder_WhenReplacePlaceholders_ThenHtmlInserted()
        {
            var tracker = new PlaceholderTracker();
            var html    = tracker.InsertPlaceholder(() => ("<p>test</p>"));

            tracker.ReplacePlaceholders(html).ShouldEqual(
                Environment.NewLine + "<p>test</p>" + Environment.NewLine
                );
        }
Ejemplo n.º 2
0
        public void WhenInsertPlaceholder_ThenPlaceholderIdHtmlReturned()
        {
            var tracker = new PlaceholderTracker();
            var result = tracker.InsertPlaceholder(() => (""));

            var guidRegex = new Regex(@"[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}");
            var output = result;
            guidRegex.IsMatch(output).ShouldBeTrue();
        }
Ejemplo n.º 3
0
        public void GivenInsertPlaceholder_WhenReplacePlaceholders_ThenHtmlInserted()
        {
            var tracker = new PlaceholderTracker();
            var html = tracker.InsertPlaceholder(() => ("<p>test</p>"));

            tracker.ReplacePlaceholders(html).ShouldEqual(
                Environment.NewLine + "<p>test</p>" + Environment.NewLine
            );
        }
Ejemplo n.º 4
0
        public void WhenInsertPlaceholder_ThenPlaceholderIdHtmlReturned()
        {
            var tracker = new PlaceholderTracker();
            var result  = tracker.InsertPlaceholder(() => (""));

            var guidRegex = new Regex(@"[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}");
            var output    = result;

            guidRegex.IsMatch(output).ShouldBeTrue();
        }