public void Width_Method() { Assert.Throws <ArgumentNullException>(() => IVkontakteAuthButtonWidgetExtensions.Width(null, 0)); new VkontakteAuthButtonWidget().Do(widget => { Assert.True(ReferenceEquals(widget.Width(1), widget)); Assert.Equal("1", widget.Width()); }); }
public void Dynamic_Method() { Assert.Throws <ArgumentNullException>(() => IVkontakteAuthButtonWidgetExtensions.Dynamic(null, "callback")); Assert.Throws <ArgumentNullException>(() => new VkontakteAuthButtonWidget().Dynamic(null)); Assert.Throws <ArgumentException>(() => new VkontakteAuthButtonWidget().Dynamic(string.Empty)); new VkontakteAuthButtonWidget().Do(widget => { Assert.True(ReferenceEquals(widget.Dynamic("callback"), widget)); Assert.Equal(VkontakteAuthButtonType.Dynamic, widget.Type()); Assert.Equal("callback", widget.Callback()); }); }
public void Standard_Method() { Assert.Throws <ArgumentNullException>(() => IVkontakteAuthButtonWidgetExtensions.Standard(null, "url")); Assert.Throws <ArgumentNullException>(() => new VkontakteAuthButtonWidget().Standard(null)); Assert.Throws <ArgumentException>(() => new VkontakteAuthButtonWidget().Standard(string.Empty)); new VkontakteAuthButtonWidget().Do(widget => { Assert.True(ReferenceEquals(widget.Standard("url"), widget)); Assert.Equal(VkontakteAuthButtonType.Standard, widget.Type()); Assert.Equal("url", widget.Url()); }); }