public void ToHtmlString_Method()
    {
      Assert.Equal(string.Empty, new CackleCommentsWidget().ToString());

      var html = new CackleCommentsWidget().Account("account").ToString();
       Assert.True(html.Contains(@"<div id=""mc-container""></div>"));
      Assert.True(html.Contains(@"{""widget"":""Comment"",""id"":""account""}"));
    }
Exemplo n.º 2
0
        public void ToHtmlString_Method()
        {
            Assert.Equal(string.Empty, new CackleCommentsWidget().ToString());

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

            Assert.True(html.Contains(@"<div id=""mc-container""></div>"));
            Assert.True(html.Contains(@"{""widget"":""Comment"",""id"":""account""}"));
        }
    public void Account_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new CackleCommentsWidget().Account(null));
      Assert.Throws<ArgumentException>(() => new CackleCommentsWidget().Account(string.Empty));

      var widget = new CackleCommentsWidget();
      Assert.Null(widget.Account());
      Assert.True(ReferenceEquals(widget.Account("account"), widget));
      Assert.Equal("account", widget.Account().To<string>());
    }
Exemplo n.º 4
0
        public void Account_Method()
        {
            Assert.Throws <ArgumentNullException>(() => new CackleCommentsWidget().Account(null));
            Assert.Throws <ArgumentException>(() => new CackleCommentsWidget().Account(string.Empty));

            var widget = new CackleCommentsWidget();

            Assert.Null(widget.Account());
            Assert.True(ReferenceEquals(widget.Account("account"), widget));
            Assert.Equal("account", widget.Account().To <string>());
        }
Exemplo n.º 5
0
        public void Constructors()
        {
            var widget = new CackleCommentsWidget();

            Assert.Null(widget.Account());
        }
 public void Constructors()
 {
   var widget = new CackleCommentsWidget();
   Assert.Null(widget.Account());
 }