public void PlusOneButton_Method() { Assert.Throws <ArgumentNullException>(() => IGoogleHtmlHelperExtensions.PlusOneButton(null, widget => { })); Assert.Throws <ArgumentNullException>(() => new GoogleHtmlHelper().PlusOneButton(null)); Assert.Equal(new GoogleHtmlHelper().PlusOneButton().ToHtmlString(), new GoogleHtmlHelper().PlusOneButton(x => { })); Assert.Equal(new GoogleHtmlHelper().PlusOneButton().Url("url").ToHtmlString(), new GoogleHtmlHelper().PlusOneButton(x => x.Url("url"))); }
public void Analytics_Method() { Assert.Throws <ArgumentNullException>(() => IGoogleHtmlHelperExtensions.Analytics(null, widget => { })); Assert.Throws <ArgumentNullException>(() => new GoogleHtmlHelper().Analytics(null)); Assert.Equal(new GoogleHtmlHelper().Analytics().ToHtmlString(), new GoogleHtmlHelper().Analytics(x => { })); Assert.Equal(new GoogleHtmlHelper().Analytics().Account("account").Domain("domain").ToHtmlString(), new GoogleHtmlHelper().Analytics(x => x.Account("account").Domain("domain"))); }