public void Callback_Method() { Assert.Throws <ArgumentNullException>(() => new GooglePlusOneButtonWidget().Callback(null)); Assert.Throws <ArgumentException>(() => new GooglePlusOneButtonWidget().Callback(string.Empty)); var widget = new GooglePlusOneButtonWidget(); Assert.Null(widget.Callback()); Assert.True(ReferenceEquals(widget.Callback("callback"), widget)); Assert.Equal("callback", widget.Callback()); }
public void Constructors() { var widget = new GooglePlusOneButtonWidget(); Assert.Null(widget.Url()); Assert.Null(widget.Width()); Assert.Null(widget.Size()); Assert.Null(widget.Alignment()); Assert.Null(widget.Annotation()); Assert.Null(widget.Callback()); Assert.Null(widget.Recommendations()); }
public void Callback_Method() { Assert.Throws<ArgumentNullException>(() => new GooglePlusOneButtonWidget().Callback(null)); Assert.Throws<ArgumentException>(() => new GooglePlusOneButtonWidget().Callback(string.Empty)); var widget = new GooglePlusOneButtonWidget(); Assert.Null(widget.Callback()); Assert.True(ReferenceEquals(widget.Callback("callback"), widget)); Assert.Equal("callback", widget.Callback()); }