public void ToHtmlString_Method() { Assert.Equal(string.Empty, new VkontakteInitializationWidget().ToString()); var html = new VkontakteInitializationWidget().ApiId("id").ToString(); Assert.True(html.Contains(@"<script type=""text/javascript"">")); Assert.True(html.Contains(@"VK.init({apiId:id, onlyWidgets:true});")); }
public void ToHtmlString_Method() { Assert.Equal(string.Empty, new VkontakteInitializationWidget().ToString()); var html = new VkontakteInitializationWidget().ApiId("id").ToString(); Assert.True(html.Contains(@"<script type=""text/javascript"">")); Assert.True(html.Contains(@"VK.init({apiId:id, onlyWidgets:true});")); }
public void ApiId_Method() { Assert.Throws<ArgumentNullException>(() => new VkontakteInitializationWidget().ApiId(null)); Assert.Throws<ArgumentException>(() => new VkontakteInitializationWidget().ApiId(string.Empty)); var widget = new VkontakteInitializationWidget(); Assert.Null(widget.ApiId()); Assert.True(ReferenceEquals(widget.ApiId("apiId"), widget)); Assert.Equal("apiId", widget.ApiId()); }
public void ApiId_Method() { Assert.Throws <ArgumentNullException>(() => new VkontakteInitializationWidget().ApiId(null)); Assert.Throws <ArgumentException>(() => new VkontakteInitializationWidget().ApiId(string.Empty)); var widget = new VkontakteInitializationWidget(); Assert.Null(widget.ApiId()); Assert.True(ReferenceEquals(widget.ApiId("apiId"), widget)); Assert.Equal("apiId", widget.ApiId()); }
public void Constructors() { var widget = new VkontakteInitializationWidget(); Assert.Null(widget.ApiId()); }
public void Constructors() { var widget = new VkontakteInitializationWidget(); Assert.Null(widget.ApiId()); }