Exemple #1
0
    public void ToHtmlString_Method()
    {
      Assert.Equal(string.Empty, new FacebookInitializationWidget().ToString());

      var html = new FacebookInitializationWidget().AppId("appId").ToString();
      Assert.True(html.Contains(@"<div id=""fb-root""></div>"));
      Assert.True(html.Contains(@"//connect.facebook.net/en_US/all.js#xfbml=1&appId=appId"));
    }
Exemple #2
0
    public void AppId_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new FacebookInitializationWidget().AppId(null));
      Assert.Throws<ArgumentException>(() => new FacebookInitializationWidget().AppId(string.Empty));

      var widget = new FacebookInitializationWidget();
      Assert.Null(widget.AppId());
      Assert.True(ReferenceEquals(widget.AppId("appId"), widget));
      Assert.Equal("appId", widget.AppId());
    }
Exemple #3
0
 public void Constructors()
 {
   var widget = new FacebookInitializationWidget();
   Assert.Null(widget.AppId());
 }