Esempio n. 1
0
        public void Constructors()
        {
            var widget = new MailRuIcqWidget();

            Assert.Null(widget.Account());
            Assert.Null(widget.Language());
        }
    public void ToHtmlString_Method()
    {
      Assert.Equal(@"<script src=""http://c.icq.com/siteim/icqbar/js/partners/initbar_ru.js"" type=""text/javascript""></script>", new MailRuIcqWidget().ToString());

      var html = new MailRuIcqWidget().Account("account").Language("en").ToString();
      Assert.True(html.Contains("window.ICQ = {siteOwner:'account'};"));
      Assert.True(html.Contains(@"<script src=""http://c.icq.com/siteim/icqbar/js/partners/initbar_en.js"" type=""text/javascript""></script>"));
    }
Esempio n. 3
0
        public void ToHtmlString_Method()
        {
            Assert.Equal(@"<script src=""http://c.icq.com/siteim/icqbar/js/partners/initbar_ru.js"" type=""text/javascript""></script>", new MailRuIcqWidget().ToString());

            var html = new MailRuIcqWidget().Account("account").Language("en").ToString();

            Assert.True(html.Contains("window.ICQ = {siteOwner:'account'};"));
            Assert.True(html.Contains(@"<script src=""http://c.icq.com/siteim/icqbar/js/partners/initbar_en.js"" type=""text/javascript""></script>"));
        }
    public void Language_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new MailRuIcqWidget().Language(null));
      Assert.Throws<ArgumentException>(() => new MailRuIcqWidget().Language(string.Empty));

      var widget = new MailRuIcqWidget();
      Assert.Null(widget.Language());
      Assert.True(ReferenceEquals(widget.Language("language"), widget));
      Assert.Equal("language", widget.Language());
    }
    public void Account_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new MailRuIcqWidget().Account(null));
      Assert.Throws<ArgumentException>(() => new MailRuIcqWidget().Account(string.Empty));

      var widget = new MailRuIcqWidget();
      Assert.Null(widget.Account());
      Assert.True(ReferenceEquals(widget.Account("account"), widget));
      Assert.Equal("account", widget.Account());
    }
Esempio n. 6
0
        public void Language_Method()
        {
            Assert.Throws <ArgumentNullException>(() => new MailRuIcqWidget().Language(null));
            Assert.Throws <ArgumentException>(() => new MailRuIcqWidget().Language(string.Empty));

            var widget = new MailRuIcqWidget();

            Assert.Null(widget.Language());
            Assert.True(ReferenceEquals(widget.Language("language"), widget));
            Assert.Equal("language", widget.Language());
        }
Esempio n. 7
0
        public void Account_Method()
        {
            Assert.Throws <ArgumentNullException>(() => new MailRuIcqWidget().Account(null));
            Assert.Throws <ArgumentException>(() => new MailRuIcqWidget().Account(string.Empty));

            var widget = new MailRuIcqWidget();

            Assert.Null(widget.Account());
            Assert.True(ReferenceEquals(widget.Account("account"), widget));
            Assert.Equal("account", widget.Account());
        }
 public void Constructors()
 {
   var widget = new MailRuIcqWidget();
   Assert.Null(widget.Account());
   Assert.Null(widget.Language());
 }