Ejemplo n.º 1
0
        public void TweetButton_Method()
        {
            Assert.Throws <ArgumentNullException>(() => ITwitterHtmlHelperExtensions.TweetButton(null, widget => { }));
            Assert.Throws <ArgumentNullException>(() => new TwitterHtmlHelper().TweetButton(null));

            Assert.Equal(new TwitterHtmlHelper().TweetButton().ToHtmlString(), new TwitterHtmlHelper().TweetButton(x => { }));
            Assert.Equal(new TwitterHtmlHelper().TweetButton().Text("text").ToHtmlString(), new TwitterHtmlHelper().TweetButton(x => x.Text("text")));
        }
Ejemplo n.º 2
0
        public void FollowButton_Method()
        {
            Assert.Throws <ArgumentNullException>(() => ITwitterHtmlHelperExtensions.FollowButton(null, widget => { }));
            Assert.Throws <ArgumentNullException>(() => new TwitterHtmlHelper().FollowButton(null));

            Assert.Equal(new TwitterHtmlHelper().FollowButton().ToHtmlString(), new TwitterHtmlHelper().FollowButton(x => { }));
            Assert.Equal(new TwitterHtmlHelper().FollowButton().Account("account").ToHtmlString(), new TwitterHtmlHelper().FollowButton(x => x.Account("account")));
        }