public void Max_Method()
 {
   var widget = new CackleLatestCommentsWidget();
   Assert.Equal(5, widget.Max());
   Assert.True(ReferenceEquals(widget.Max(1), widget));
   Assert.Equal(1, widget.Max());
 }
 public void TitleSize_Method()
 {
   var widget = new CackleLatestCommentsWidget();
   Assert.Equal(40, widget.TitleSize());
   Assert.True(ReferenceEquals(widget.TitleSize(1), widget));
   Assert.Equal(1, widget.TitleSize());
 }
예제 #3
0
        public void TitleSize_Method()
        {
            var widget = new CackleLatestCommentsWidget();

            Assert.Equal(40, widget.TitleSize());
            Assert.True(ReferenceEquals(widget.TitleSize(1), widget));
            Assert.Equal(1, widget.TitleSize());
        }
예제 #4
0
        public void Max_Method()
        {
            var widget = new CackleLatestCommentsWidget();

            Assert.Equal(5, widget.Max());
            Assert.True(ReferenceEquals(widget.Max(1), widget));
            Assert.Equal(1, widget.Max());
        }
 public void Constructors()
 {
   var widget = new CackleLatestCommentsWidget();
   Assert.Null(widget.Account());
   Assert.Equal(32, widget.AvatarSize());
   Assert.Equal(5, widget.Max());
   Assert.Equal(150, widget.TextSize());
   Assert.Equal(40, widget.TitleSize());
 }
    public void Account_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new CackleLatestCommentsWidget().Account(null));
      Assert.Throws<ArgumentException>(() => new CackleLatestCommentsWidget().Account(string.Empty));

      var widget = new CackleLatestCommentsWidget();
      Assert.Null(widget.Account());
      Assert.True(ReferenceEquals(widget.Account("account"), widget));
      Assert.Equal("account", widget.Account());
    }
예제 #7
0
        public void Constructors()
        {
            var widget = new CackleLatestCommentsWidget();

            Assert.Null(widget.Account());
            Assert.Equal(32, widget.AvatarSize());
            Assert.Equal(5, widget.Max());
            Assert.Equal(150, widget.TextSize());
            Assert.Equal(40, widget.TitleSize());
        }
예제 #8
0
        public void Account_Method()
        {
            Assert.Throws <ArgumentNullException>(() => new CackleLatestCommentsWidget().Account(null));
            Assert.Throws <ArgumentException>(() => new CackleLatestCommentsWidget().Account(string.Empty));

            var widget = new CackleLatestCommentsWidget();

            Assert.Null(widget.Account());
            Assert.True(ReferenceEquals(widget.Account("account"), widget));
            Assert.Equal("account", widget.Account());
        }
예제 #9
0
        public void ToHtmlString_Method()
        {
            Assert.Equal(string.Empty, new CackleLatestCommentsWidget().ToString());

            var html = new CackleLatestCommentsWidget().Account("account").ToString();

            Assert.True(html.Contains(@"<div id=""mc-last""></div>"));
            Assert.True(html.Contains(@"{""widget"":""CommentRecent"",""id"":""account"",""size"":5,""avatarSize"":32,""textSize"":150,""titleSize"":40}"));

            html = new CackleLatestCommentsWidget().Account("account").Max(1).AvatarSize(2).TextSize(3).TitleSize(4).ToString();
            Assert.True(html.Contains(@"<div id=""mc-last""></div>"));
            Assert.True(html.Contains(@"{""widget"":""CommentRecent"",""id"":""account"",""size"":1,""avatarSize"":2,""textSize"":3,""titleSize"":4}"));
        }
    public void ToHtmlString_Method()
    {
      Assert.Equal(string.Empty, new CackleLatestCommentsWidget().ToString());

      var html = new CackleLatestCommentsWidget().Account("account").ToString();
      Assert.True(html.Contains(@"<div id=""mc-last""></div>"));
      Assert.True(html.Contains(@"{""widget"":""CommentRecent"",""id"":""account"",""size"":5,""avatarSize"":32,""textSize"":150,""titleSize"":40}"));

      html = new CackleLatestCommentsWidget().Account("account").Max(1).AvatarSize(2).TextSize(3).TitleSize(4).ToString();
      Assert.True(html.Contains(@"<div id=""mc-last""></div>"));
      Assert.True(html.Contains(@"{""widget"":""CommentRecent"",""id"":""account"",""size"":1,""avatarSize"":2,""textSize"":3,""titleSize"":4}"));
    }