public void ToHtmlString_Method() { Assert.Equal(string.Empty, new CackleLoginWidget().ToString()); var html = new CackleLoginWidget().Account("account").ToString(); Assert.True(html.Contains(@"<div id=""mc-login""></div>")); Assert.True(html.Contains(@"{""widget"":""Login"",""id"":""account""}")); }
public void Account_Method() { Assert.Throws<ArgumentNullException>(() => new CackleLoginWidget().Account(null)); Assert.Throws<ArgumentException>(() => new CackleLoginWidget().Account(string.Empty)); var widget = new CackleLoginWidget(); Assert.Null(widget.Account()); Assert.True(ReferenceEquals(widget.Account("account"), widget)); Assert.Equal("account", widget.Account()); }
public void Account_Method() { Assert.Throws <ArgumentNullException>(() => new CackleLoginWidget().Account(null)); Assert.Throws <ArgumentException>(() => new CackleLoginWidget().Account(string.Empty)); var widget = new CackleLoginWidget(); Assert.Null(widget.Account()); Assert.True(ReferenceEquals(widget.Account("account"), widget)); Assert.Equal("account", widget.Account()); }
public void Constructors() { var widget = new CackleLoginWidget(); Assert.Null(widget.Account()); }