public void Extension_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new GravatarImageUrlWidget().Extension(null));
      Assert.Throws<ArgumentException>(() => new GravatarImageUrlWidget().Extension(string.Empty));

      var widget = new GravatarImageUrlWidget();
      Assert.Null(widget.Extension());
      Assert.True(ReferenceEquals(widget.Extension("extension"), widget));
      Assert.Equal("extension", widget.Extension());
    }
Ejemplo n.º 2
0
        public void Extension_Method()
        {
            Assert.Throws <ArgumentNullException>(() => new GravatarImageUrlWidget().Extension(null));
            Assert.Throws <ArgumentException>(() => new GravatarImageUrlWidget().Extension(string.Empty));

            var widget = new GravatarImageUrlWidget();

            Assert.Null(widget.Extension());
            Assert.True(ReferenceEquals(widget.Extension("extension"), widget));
            Assert.Equal("extension", widget.Extension());
        }
 public void Constructors()
 {
   var widget = new GravatarImageUrlWidget();
   Assert.Null(widget.Extension());
   Assert.Null(widget.Hash());
   Assert.False(widget.Field("parameters").To<IDictionary<string, object>>().Any());
 }
Ejemplo n.º 4
0
        public void Constructors()
        {
            var widget = new GravatarImageUrlWidget();

            Assert.Null(widget.Extension());
            Assert.Null(widget.Hash());
            Assert.False(widget.Field("parameters").To <IDictionary <string, object> >().Any());
        }