public void Url_Method() { Assert.Throws<ArgumentNullException>(() => new YandexLikeButtonWidget().Url(null)); Assert.Throws<ArgumentException>(() => new YandexLikeButtonWidget().Url(string.Empty)); var widget = new YandexLikeButtonWidget(); Assert.Null(widget.Url()); Assert.True(ReferenceEquals(widget.Url("url"), widget)); Assert.Equal("url", widget.Url()); }
public void Url_Method() { Assert.Throws <ArgumentNullException>(() => new YandexLikeButtonWidget().Url(null)); Assert.Throws <ArgumentException>(() => new YandexLikeButtonWidget().Url(string.Empty)); var widget = new YandexLikeButtonWidget(); Assert.Null(widget.Url()); Assert.True(ReferenceEquals(widget.Url("url"), widget)); Assert.Equal("url", widget.Url()); }
public void Constructors() { var widget = new YandexLikeButtonWidget(); Assert.Null(widget.Url()); Assert.Null(widget.Title()); Assert.Equal(YandexLikeButtonSize.Large.ToString().ToLowerInvariant(), widget.Size()); Assert.Equal(YandexLikeButtonLayout.Button.ToString().ToLowerInvariant(), widget.Layout()); Assert.Null(widget.Text()); }