public void LikeButton_Method() { Assert.Throws <ArgumentNullException>(() => IFacebookHtmlHelperExtensions.LikeButton(null, widget => { })); Assert.Throws <ArgumentNullException>(() => new FacebookHtmlHelper().LikeButton(null)); Assert.Equal(new FacebookHtmlHelper().LikeButton().ToHtmlString(), new FacebookHtmlHelper().LikeButton(x => { })); Assert.Equal(new FacebookHtmlHelper().LikeButton().Url("url").ToHtmlString(), new FacebookHtmlHelper().LikeButton(x => x.Url("url"))); }
public void Video_Method() { Assert.Throws <ArgumentNullException>(() => IFacebookHtmlHelperExtensions.Video(null, widget => { })); Assert.Throws <ArgumentNullException>(() => new FacebookHtmlHelper().Video(null)); Assert.Equal(new FacebookHtmlHelper().Video().ToHtmlString(), new FacebookHtmlHelper().Video(x => { })); Assert.Equal(new FacebookHtmlHelper().Video().Id("id").ToHtmlString(), new FacebookHtmlHelper().Video(x => x.Id("id"))); }
public void RecommendationsFeed_Method() { Assert.Throws <ArgumentNullException>(() => IFacebookHtmlHelperExtensions.RecommendationsFeed(null, widget => { })); Assert.Throws <ArgumentNullException>(() => new FacebookHtmlHelper().RecommendationsFeed(null)); Assert.Equal(new FacebookHtmlHelper().RecommendationsFeed().ToHtmlString(), new FacebookHtmlHelper().RecommendationsFeed(x => { })); Assert.Equal(new FacebookHtmlHelper().RecommendationsFeed().Domain("domain").ToHtmlString(), new FacebookHtmlHelper().RecommendationsFeed(x => x.Domain("domain"))); }
public void Initialize_Method() { Assert.Throws <ArgumentNullException>(() => IFacebookHtmlHelperExtensions.Initialize(null, widget => { })); Assert.Throws <ArgumentNullException>(() => new FacebookHtmlHelper().Initialize(null)); Assert.Equal(new FacebookHtmlHelper().Initialize().ToHtmlString(), new FacebookHtmlHelper().Initialize(x => { })); Assert.Equal(new FacebookHtmlHelper().Initialize().AppId("appId").ToHtmlString(), new FacebookHtmlHelper().Initialize(x => x.AppId("appId"))); }