public void Constructors()
 {
   var widget = new GravatarProfileUrlWidget();
   Assert.Null(widget.Hash());
   Assert.Null(widget.Format());
   Assert.False(widget.Field("parameters").To<IDictionary<string, object>>().Any());
 }
        public void Constructors()
        {
            var widget = new GravatarProfileUrlWidget();

            Assert.Null(widget.Hash());
            Assert.Null(widget.Format());
            Assert.False(widget.Field("parameters").To <IDictionary <string, object> >().Any());
        }
    public void Format_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new GravatarProfileUrlWidget().Format(null));
      Assert.Throws<ArgumentException>(() => new GravatarProfileUrlWidget().Format(string.Empty));

      var widget = new GravatarProfileUrlWidget();
      Assert.Null(widget.Format());
      Assert.True(ReferenceEquals(widget.Format("format"), widget));
      Assert.Equal("format", widget.Format());
    }
    public void Hash_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new GravatarProfileUrlWidget().Hash(null));
      Assert.Throws<ArgumentException>(() => new GravatarProfileUrlWidget().Hash(string.Empty));

      var widget = new GravatarProfileUrlWidget();
      Assert.Null(widget.Hash());
      Assert.True(ReferenceEquals(widget.Hash("hash"), widget));
      Assert.Equal("hash", widget.Hash());
    }
        public void Format_Method()
        {
            Assert.Throws <ArgumentNullException>(() => new GravatarProfileUrlWidget().Format(null));
            Assert.Throws <ArgumentException>(() => new GravatarProfileUrlWidget().Format(string.Empty));

            var widget = new GravatarProfileUrlWidget();

            Assert.Null(widget.Format());
            Assert.True(ReferenceEquals(widget.Format("format"), widget));
            Assert.Equal("format", widget.Format());
        }
        public void Hash_Method()
        {
            Assert.Throws <ArgumentNullException>(() => new GravatarProfileUrlWidget().Hash(null));
            Assert.Throws <ArgumentException>(() => new GravatarProfileUrlWidget().Hash(string.Empty));

            var widget = new GravatarProfileUrlWidget();

            Assert.Null(widget.Hash());
            Assert.True(ReferenceEquals(widget.Hash("hash"), widget));
            Assert.Equal("hash", widget.Hash());
        }
    public void Parameter_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new GravatarProfileUrlWidget().Parameter(null, new object()));
      Assert.Throws<ArgumentNullException>(() => new GravatarProfileUrlWidget().Parameter("name", null));
      Assert.Throws<ArgumentException>(() => new GravatarProfileUrlWidget().Parameter(string.Empty, new object()));

      var widget = new GravatarProfileUrlWidget();
      Assert.False(widget.Field("parameters").To<IDictionary<string, object>>().Any());
      Assert.True(ReferenceEquals(widget.Parameter("name", "value"), widget));
      var parameters = widget.Field("parameters").To<IDictionary<string, object>>();
      Assert.Equal(1, parameters.Count);
      Assert.Equal("value", parameters["name"]);
    }
        public void Parameter_Method()
        {
            Assert.Throws <ArgumentNullException>(() => new GravatarProfileUrlWidget().Parameter(null, new object()));
            Assert.Throws <ArgumentNullException>(() => new GravatarProfileUrlWidget().Parameter("name", null));
            Assert.Throws <ArgumentException>(() => new GravatarProfileUrlWidget().Parameter(string.Empty, new object()));

            var widget = new GravatarProfileUrlWidget();

            Assert.False(widget.Field("parameters").To <IDictionary <string, object> >().Any());
            Assert.True(ReferenceEquals(widget.Parameter("name", "value"), widget));
            var parameters = widget.Field("parameters").To <IDictionary <string, object> >();

            Assert.Equal(1, parameters.Count);
            Assert.Equal("value", parameters["name"]);
        }