public void Account_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new YandexMoneyButtonWidget().Account(null));
      Assert.Throws<ArgumentException>(() => new YandexMoneyButtonWidget().Account(string.Empty));

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

            var widget = new YandexMoneyButtonWidget();

            Assert.Null(widget.Account());
            Assert.True(ReferenceEquals(widget.Account("account"), widget));
            Assert.Equal("account", widget.Account());
        }
 public void Constructors()
 {
   var widget = new YandexMoneyButtonWidget();
   Assert.Null(widget.Account());
   Assert.False(widget.AskPayerFullName());
   Assert.False(widget.AskPayerEmail());
   Assert.False(widget.AskPayerPhone());
   Assert.False(widget.AskPayerAddress());
   Assert.Equal("orange", widget.Color());
   Assert.Null(widget.Description());
   Assert.Equal("l", widget.Size());
   Assert.Null(widget.Sum());
   Assert.Equal((byte) YandexMoneyButtonText.Pay, widget.Text());
   Assert.Equal("yamoney-payment-type", widget.Type());
 }
Ejemplo n.º 4
0
        public void Constructors()
        {
            var widget = new YandexMoneyButtonWidget();

            Assert.Null(widget.Account());
            Assert.False(widget.AskPayerFullName());
            Assert.False(widget.AskPayerEmail());
            Assert.False(widget.AskPayerPhone());
            Assert.False(widget.AskPayerAddress());
            Assert.Equal("orange", widget.Color());
            Assert.Null(widget.Description());
            Assert.Equal("l", widget.Size());
            Assert.Null(widget.Sum());
            Assert.Equal((byte)YandexMoneyButtonText.Pay, widget.Text());
            Assert.Equal("yamoney-payment-type", widget.Type());
        }