public void Layout_Method() { Assert.Throws<ArgumentNullException>(() => new YandexSharePanelWidget().Layout(null)); Assert.Throws<ArgumentException>(() => new YandexSharePanelWidget().Layout(string.Empty)); var widget = new YandexSharePanelWidget(); Assert.Equal(YandexSharePanelLayout.Button.ToString().ToLowerInvariant(), widget.Layout()); Assert.True(ReferenceEquals(widget.Layout("layout"), widget)); Assert.Equal("layout", widget.Layout()); }
public void Layout_Method() { Assert.Throws <ArgumentNullException>(() => new YandexSharePanelWidget().Layout(null)); Assert.Throws <ArgumentException>(() => new YandexSharePanelWidget().Layout(string.Empty)); var widget = new YandexSharePanelWidget(); Assert.Equal(YandexSharePanelLayout.Button.ToString().ToLowerInvariant(), widget.Layout()); Assert.True(ReferenceEquals(widget.Layout("layout"), widget)); Assert.Equal("layout", widget.Layout()); }
public void Constructors() { var widget = new YandexSharePanelWidget(); Assert.Null(widget.Language()); Assert.Equal(YandexSharePanelLayout.Button.ToString().ToLowerInvariant(), widget.Layout()); Assert.True(widget.Services().SequenceEqual(new [] { "yaru", "vkontakte", "facebook", "twitter", "odnoklassniki", "moimir", "lj", "friendfeed", "moikrug", "gplus", "pinterest", "surfingbird" })); }
public void Constructors() { var widget = new YandexSharePanelWidget(); Assert.Null(widget.Language()); Assert.Equal(YandexSharePanelLayout.Button.ToString().ToLowerInvariant(), widget.Layout()); Assert.True(widget.Services().SequenceEqual(new [] { "yaru", "vkontakte", "facebook", "twitter", "odnoklassniki", "moimir", "lj", "friendfeed", "moikrug", "gplus", "pinterest", "surfingbird" })); }