Exemplo n.º 1
0
 private void InputAddresses_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Control && e.KeyCode == Keys.A)
     {
         InputAddresses.SelectAll();
     }
 }
 protected override void BeforeTest()
 {
     Assert.AreEqual(2, InputAddresses.Count(), "'InputAddresses' count is wrong");
     Assert.AreEqual(1, OutputAddresses.Count(), "'OutputAddresses' count is wrong");
     Assert.AreEqual(InputAddresses.Sum(a => a.Value), OutputAddresses.Sum(a => a.Value),
                     "Sum of 'inputAddresses' is not equals sum of 'outputAddresses'");
 }
        public void NotEnoughBalance()
        {
            // increase in "multiplier" times
            var multiplier     = 100000000;
            var inputAddresses = InputAddresses.Select(
                address => new TransactionAddress(address.Address, address.Value * multiplier));
            var outputAddresses = OutputAddresses.Select(
                address => new TransactionAddress(address.Address, address.Value * multiplier));

            var response = Manager.Blockchains.Transaction.CreateTransaction <CreateBtcTransactionResponse>(
                NetworkCoin, inputAddresses, outputAddresses, Fee);

            AssertErrorMessagePart(response, "Not enough balance in ");
            Assert.IsTrue(response.Payload == null);
        }