Exemple #1
0
        public void Constructors()
        {
            var widget = new FacebookPostWidget();

            Assert.Null(widget.Url());
            Assert.Null(widget.Width());
        }
    public void Width_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new FacebookPostWidget().Width(null));
      Assert.Throws<ArgumentException>(() => new FacebookPostWidget().Width(string.Empty));

      var widget = new FacebookPostWidget();
      Assert.Null(widget.Width());
      Assert.True(ReferenceEquals(widget.Width("width"), widget));
      Assert.Equal("width", widget.Width());
    }
Exemple #3
0
        public void Width_Method()
        {
            Assert.Throws <ArgumentNullException>(() => new FacebookPostWidget().Width(null));
            Assert.Throws <ArgumentException>(() => new FacebookPostWidget().Width(string.Empty));

            var widget = new FacebookPostWidget();

            Assert.Null(widget.Width());
            Assert.True(ReferenceEquals(widget.Width("width"), widget));
            Assert.Equal("width", widget.Width());
        }
 public void Constructors()
 {
   var widget = new FacebookPostWidget();
   Assert.Null(widget.Url());
   Assert.Null(widget.Width());
 }