public void Text_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new TwitterTweetButtonWidget().Text(null));
      Assert.Throws<ArgumentException>(() => new TwitterTweetButtonWidget().Text(string.Empty));

      var widget = new TwitterTweetButtonWidget();
      Assert.Null(widget.Text());
      Assert.True(ReferenceEquals(widget.Text("text"), widget));
      Assert.Equal("text", widget.Text());
    }
Exemple #2
0
        public void Text_Method()
        {
            Assert.Throws <ArgumentNullException>(() => new TwitterTweetButtonWidget().Text(null));
            Assert.Throws <ArgumentException>(() => new TwitterTweetButtonWidget().Text(string.Empty));

            var widget = new TwitterTweetButtonWidget();

            Assert.Null(widget.Text());
            Assert.True(ReferenceEquals(widget.Text("text"), widget));
            Assert.Equal("text", widget.Text());
        }
 public void Constructors()
 {
   var widget = new TwitterTweetButtonWidget();
   Assert.Null(widget.Url());
   Assert.Null(widget.Language());
   Assert.Null(widget.Text());
   Assert.Null(widget.Via());
   Assert.Null(widget.Size());
   Assert.Null(widget.CountUrl());
   Assert.Null(widget.CounterPosition());
   Assert.Null(widget.Suggestions());
   Assert.False(widget.HashTags().Any());
   Assert.False(widget.RelatedAccounts().Any());
 }
Exemple #4
0
        public void Constructors()
        {
            var widget = new TwitterTweetButtonWidget();

            Assert.Null(widget.Url());
            Assert.Null(widget.Language());
            Assert.Null(widget.Text());
            Assert.Null(widget.Via());
            Assert.Null(widget.Size());
            Assert.Null(widget.CountUrl());
            Assert.Null(widget.CounterPosition());
            Assert.Null(widget.Suggestions());
            Assert.False(widget.HashTags().Any());
            Assert.False(widget.RelatedAccounts().Any());
        }