Esempio n. 1
0
        public async void TipNxtShouldSucceedWithMultipleWhiteSpaces(int whiteSpaceCount)
        {
            const decimal tipAmount = 42;
            var           spaces    = new string(' ', whiteSpaceCount);
            var           message   = CreateChannelMessage($"tipper{spaces}tip{spaces}<@{TestConstants.RecipientAccount.SlackId}>{spaces}42");

            await SendSuccessfulTip(message, tipAmount);

            slackConnectorMock.Verify(c => c.SendMessage(channelSession.Id,
                                                         It.Is <string>(input => input.Equals(MessageConstants.TipSentChannel(slackUser.Id, TestConstants.RecipientAccount.SlackId, tipAmount, "NXT", txId, ""))), false));
        }
Esempio n. 2
0
        private async void TipAssetShouldSucceed()
        {
            const decimal tipAmount = 42;

            await SetupSuccessfulTipTransferable(TestConstants.Asset, TestConstants.Asset.Name, tipAmount);

            slackConnectorMock.Verify(c => c.SendMessage(channelSession.Id,
                                                         It.Is <string>(input => input.Equals(MessageConstants.TipSentChannel(slackUser.Id,
                                                                                                                              TestConstants.RecipientAccount.SlackId, tipAmount, TestConstants.Asset.Name, txId, ""))), false));
        }
Esempio n. 3
0
        public async void TipNxtShouldSucceed(string unit)
        {
            const decimal tipAmount = 42;
            var           message   = CreateChannelMessage($"tipper tip <@{TestConstants.RecipientAccount.SlackId}> 42{unit}");

            await SendSuccessfulTip(message, tipAmount);

            slackConnectorMock.Verify(c => c.SendMessage(channelSession.Id,
                                                         It.Is <string>(input => input.Equals(MessageConstants.TipSentChannel(slackUser.Id, TestConstants.RecipientAccount.SlackId, tipAmount, "NXT", txId, ""))), false));
        }