Exemple #1
0
        public void Url_Method()
        {
            Assert.Throws <ArgumentNullException>(() => new VkontakteLikeButtonWidget().Url(null));
            Assert.Throws <ArgumentException>(() => new VkontakteLikeButtonWidget().Url(string.Empty));

            var widget = new VkontakteLikeButtonWidget();

            Assert.Null(widget.Url());
            Assert.True(ReferenceEquals(widget.Url("url"), widget));
            Assert.Equal("url", widget.Url());
        }
 public void Constructors()
 {
   var widget = new VkontakteLikeButtonWidget();
   Assert.Null(widget.ElementId());
   Assert.Null(widget.Text());
   Assert.Null(widget.Verb());
   Assert.Null(widget.Layout());
   Assert.Null(widget.Width());
   Assert.Null(widget.Height());
   Assert.Null(widget.Title());
   Assert.Null(widget.Url());
   Assert.Null(widget.Description());
   Assert.Null(widget.Image());
 }
Exemple #3
0
        public void Constructors()
        {
            var widget = new VkontakteLikeButtonWidget();

            Assert.Null(widget.ElementId());
            Assert.Null(widget.Text());
            Assert.Null(widget.Verb());
            Assert.Null(widget.Layout());
            Assert.Null(widget.Width());
            Assert.Null(widget.Height());
            Assert.Null(widget.Title());
            Assert.Null(widget.Url());
            Assert.Null(widget.Description());
            Assert.Null(widget.Image());
        }
    public void Url_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new VkontakteLikeButtonWidget().Url(null));
      Assert.Throws<ArgumentException>(() => new VkontakteLikeButtonWidget().Url(string.Empty));

      var widget = new VkontakteLikeButtonWidget();
      Assert.Null(widget.Url());
      Assert.True(ReferenceEquals(widget.Url("url"), widget));
      Assert.Equal("url", widget.Url());
    }