예제 #1
0
        SendMessageBatchAsync_AnyQueueUrlAndListOfSendMessageBatchRequestEntry_CallsSqsClientSendMessageBatchAsyncWithSendMessageBatchRequestAndCancellationTokenOnce()
        {
            var clientMock = new Mock <IAmazonSQS>();
            var value1     = "url";
            var value2     = new List <SendMessageBatchRequestEntry>
            {
                new SendMessageBatchRequestEntry("id", new Sentence())
            };
            var token   = new CancellationToken();
            var subject = new AmazonSQSCompressingClient(clientMock.Object);

            var result = subject.SendMessageBatchAsync(value1, value2, token);

            clientMock.Verify(
                x => x.SendMessageBatchAsync(It.IsAny <SendMessageBatchRequest>(), token),
                Times.Once
                );
        }
예제 #2
0
        SendMessageBatchAsync_AnySendMessageBatchRequest_CallsSqsClientSendMessageBatchAsyncWithSendMessageBatchRequestAndCancellationTokenOnce()
        {
            var clientMock = new Mock <IAmazonSQS>();
            var value      = new SendMessageBatchRequest(
                "url",
                new List <SendMessageBatchRequestEntry>
            {
                new SendMessageBatchRequestEntry("id", new Sentence())
            }
                );
            var token   = new CancellationToken();
            var subject = new AmazonSQSCompressingClient(clientMock.Object);

            var result = subject.SendMessageBatchAsync(value, token);

            clientMock.Verify(
                x => x.SendMessageBatchAsync(value, token),
                Times.Once
                );
        }