Exemplo n.º 1
0
        public async Task KeysTransferTest()
        {
            var initialRecipientBalance     = "0.1";
            var expectedRecipientEndBalance = "1.1";
            var expectedSenderEndBalance    = "0";

            var txId = 1234UL;

            var(senderUrl, keyPairSender) = await _api.KeysCreatePreloadTestCoinsAsync(_transferAmount);

            var(recipientUrl, keyPairRecipient) = await _api.KeysCreatePreloadTestCoinsAsync(initialRecipientBalance);

            var resultTxId = await _api.KeysTransferAsync(_transferAmount, keyPairSender.SK, recipientUrl, txId);

            Assert.AreEqual(txId, resultTxId);

            var senderBalance = await _api.KeysBalanceFromUrlAsync(senderUrl, keyPairSender.SK);

            Validate.IsEqualAmount(expectedSenderEndBalance, senderBalance);

            var recipientBalance = await _api.KeysBalanceFromUrlAsync(recipientUrl, keyPairRecipient.SK);

            Validate.IsEqualAmount(expectedRecipientEndBalance, recipientBalance);
        }
Exemplo n.º 2
0
        public async Task KeysCreatePreloadTestCoinsTest()
        {
            var(xorUrl, keyPair) = await _api.KeysCreatePreloadTestCoinsAsync(_preloadAmount);

            await Validate.PersistedKeyPair(xorUrl, keyPair, _api);
        }
Exemplo n.º 3
0
        public async Task GenerateKeyPairTest()
        {
            var keyPair = await _api.GenerateKeyPairAsync();

            Validate.TransientKeyPair(keyPair);
        }