Beispiel #1
0
        public void CanRenderNoticeThatHasNoText()
        {
            var data = new ViewDataDictionary();
            data.Notify("test");

            var html = data.Notice("test").ToString();
            html.Should().Contain("class=\"{0}\"".AsFormat(HtmlNotice.DefaultNotificationFormat.AsFormat("test")));
        }
Beispiel #2
0
        public void CanRenderNoticeThatHasOnlyText()
        {
            var data = new ViewDataDictionary();
            data.Notify("test").AddItems("a<sd");

            var html = data.Notice("test").ToString();
            html.Should().Contain("class=\"{0}\"".AsFormat(HtmlNotice.DefaultNotificationFormat.AsFormat("test")));
            html.Should().Contain("<ul><li>a&lt;sd</li></ul>");
        }