Esempio n. 1
0
        public async void BalanceShouldReturnCorrectNxtBalance()
        {
            const decimal expectedBalance = 42M;

            SetupNxtAccount(TestConstants.SenderAccount, expectedBalance);

            await slackHandler.InstantMessageCommand("balance", slackUser, imSession);

            slackConnectorMock.Verify(c => c.SendMessage(imSession.Id,
                                                         It.Is <string>(input => input.Equals(MessageConstants.CurrentBalance(expectedBalance, Nxt.Singleton, false))), true));
        }
Esempio n. 2
0
        private async Task BalanceShouldReturnUnsupportedAssets()
        {
            const decimal expectedBalance = 42M;

            SetupNxtAccount(TestConstants.SenderAccount, 1);
            SetupTransferable(TestConstants.Asset, expectedBalance, TestConstants.SenderAccount.NxtAccountRs, false);

            await slackHandler.InstantMessageCommand("balance", slackUser, imSession);

            slackConnectorMock.Verify(c => c.SendMessage(imSession.Id,
                                                         It.Is <string>(input => input.Contains(MessageConstants.CurrentBalance(expectedBalance, TestConstants.Asset, true))), true));
        }