public void PostTitle_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new IntenseDebateCommentsWidget().PostTitle(null));
      Assert.Throws<ArgumentException>(() => new IntenseDebateCommentsWidget().PostTitle(string.Empty));

      var widget = new IntenseDebateCommentsWidget();
      Assert.Null(widget.PostTitle());
      Assert.True(ReferenceEquals(widget.PostTitle("postTitle"), widget));
      Assert.Equal("postTitle", widget.PostTitle());
    }
    public void Account_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new IntenseDebateCommentsWidget().Account(null));
      Assert.Throws<ArgumentException>(() => new IntenseDebateCommentsWidget().Account(string.Empty));

      var widget = new IntenseDebateCommentsWidget();
      Assert.Null(widget.Account());
      Assert.True(ReferenceEquals(widget.Account("account"), widget));
      Assert.Equal("account", widget.Account());
    }
        public void PostTitle_Method()
        {
            Assert.Throws <ArgumentNullException>(() => new IntenseDebateCommentsWidget().PostTitle(null));
            Assert.Throws <ArgumentException>(() => new IntenseDebateCommentsWidget().PostTitle(string.Empty));

            var widget = new IntenseDebateCommentsWidget();

            Assert.Null(widget.PostTitle());
            Assert.True(ReferenceEquals(widget.PostTitle("postTitle"), widget));
            Assert.Equal("postTitle", widget.PostTitle());
        }
        public void Account_Method()
        {
            Assert.Throws <ArgumentNullException>(() => new IntenseDebateCommentsWidget().Account(null));
            Assert.Throws <ArgumentException>(() => new IntenseDebateCommentsWidget().Account(string.Empty));

            var widget = new IntenseDebateCommentsWidget();

            Assert.Null(widget.Account());
            Assert.True(ReferenceEquals(widget.Account("account"), widget));
            Assert.Equal("account", widget.Account());
        }
    public void ToHtmlString_Method()
    {
      Assert.Equal(string.Empty, new IntenseDebateCommentsWidget().ToString());

      var html = new IntenseDebateCommentsWidget().Account("account").ToString();
      Assert.True(html.Contains(@"<script type=""text/javascript"">"));
      Assert.True(html.Contains(@"var idcomments_acct = ""account"";"));
      Assert.True(html.Contains(@"var idcomments_post_id = """""));
      Assert.True(html.Contains(@"var idcomments_post_url = """""));
      Assert.True(html.Contains(@"var idcomments_post_title = """""));

      html = new IntenseDebateCommentsWidget().Account("account").PostId("postId").PostUrl("postUrl").PostTitle("postTitle").ToString();
      Assert.True(html.Contains(@"<script type=""text/javascript"">"));
      Assert.True(html.Contains(@"var idcomments_acct = ""account"";"));
      Assert.True(html.Contains(@"var idcomments_post_id = ""postId"""));
      Assert.True(html.Contains(@"var idcomments_post_url = ""postUrl"""));
      Assert.True(html.Contains(@"var idcomments_post_title = ""postTitle"""));
    }
        public void ToHtmlString_Method()
        {
            Assert.Equal(string.Empty, new IntenseDebateCommentsWidget().ToString());

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

            Assert.True(html.Contains(@"<script type=""text/javascript"">"));
            Assert.True(html.Contains(@"var idcomments_acct = ""account"";"));
            Assert.True(html.Contains(@"var idcomments_post_id = """""));
            Assert.True(html.Contains(@"var idcomments_post_url = """""));
            Assert.True(html.Contains(@"var idcomments_post_title = """""));

            html = new IntenseDebateCommentsWidget().Account("account").PostId("postId").PostUrl("postUrl").PostTitle("postTitle").ToString();
            Assert.True(html.Contains(@"<script type=""text/javascript"">"));
            Assert.True(html.Contains(@"var idcomments_acct = ""account"";"));
            Assert.True(html.Contains(@"var idcomments_post_id = ""postId"""));
            Assert.True(html.Contains(@"var idcomments_post_url = ""postUrl"""));
            Assert.True(html.Contains(@"var idcomments_post_title = ""postTitle"""));
        }