public void ToHtmlString_Method()
    {
      Assert.Equal(string.Empty, new CackleLoginWidget().ToString());

      var html = new CackleLoginWidget().Account("account").ToString();
      Assert.True(html.Contains(@"<div id=""mc-login""></div>"));
      Assert.True(html.Contains(@"{""widget"":""Login"",""id"":""account""}"));
    }
示例#2
0
        public void ToHtmlString_Method()
        {
            Assert.Equal(string.Empty, new CackleLoginWidget().ToString());

            var html = new CackleLoginWidget().Account("account").ToString();

            Assert.True(html.Contains(@"<div id=""mc-login""></div>"));
            Assert.True(html.Contains(@"{""widget"":""Login"",""id"":""account""}"));
        }
    public void Account_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new CackleLoginWidget().Account(null));
      Assert.Throws<ArgumentException>(() => new CackleLoginWidget().Account(string.Empty));

      var widget = new CackleLoginWidget();
      Assert.Null(widget.Account());
      Assert.True(ReferenceEquals(widget.Account("account"), widget));
      Assert.Equal("account", widget.Account());
    }
示例#4
0
        public void Account_Method()
        {
            Assert.Throws <ArgumentNullException>(() => new CackleLoginWidget().Account(null));
            Assert.Throws <ArgumentException>(() => new CackleLoginWidget().Account(string.Empty));

            var widget = new CackleLoginWidget();

            Assert.Null(widget.Account());
            Assert.True(ReferenceEquals(widget.Account("account"), widget));
            Assert.Equal("account", widget.Account());
        }
 public void Constructors()
 {
   var widget = new CackleLoginWidget();
   Assert.Null(widget.Account());
 }
示例#6
0
        public void Constructors()
        {
            var widget = new CackleLoginWidget();

            Assert.Null(widget.Account());
        }