Exemple #1
0
        public void Type_Method()
        {
            Assert.Throws <ArgumentNullException>(() => new YandexMoneyButtonWidget().Type(null));
            Assert.Throws <ArgumentException>(() => new YandexMoneyButtonWidget().Type(string.Empty));

            var widget = new YandexMoneyButtonWidget();

            Assert.Equal("yamoney-payment-type", widget.Type());
            Assert.True(ReferenceEquals(widget.Type("type"), widget));
            Assert.Equal("type", widget.Type());
        }
 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());
 }
Exemple #3
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());
        }
    public void Type_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new YandexMoneyButtonWidget().Type(null));
      Assert.Throws<ArgumentException>(() => new YandexMoneyButtonWidget().Type(string.Empty));

      var widget = new YandexMoneyButtonWidget();
      Assert.Equal("yamoney-payment-type", widget.Type());
      Assert.True(ReferenceEquals(widget.Type("type"), widget));
      Assert.Equal("type", widget.Type());
    }