Пример #1
0
        public void WhenAMessageWithJobIdentifierArrivesInQueueLombard_Service_Outclearings_Recognisecourtesyamount_Request_QueueForTheFollowingVouchers(string jobId, Table table)
        {
            var vouchers = table.CreateSet <RecogniseCourtesyAmountRequest>();
            var message  = new RecogniseBatchCourtesyAmountRequest
            {
                jobIdentifier = jobId,
                voucher       = vouchers.ToArray()
            };

            AutoReadCarBus.Publish(message);

            Thread.Sleep(3000);
        }
Пример #2
0
        public void ThenThereWillBeAMessageInLombard_Service_Outclearings_Recognisecourtesyamount_Response_QueueWithJobIdentifierAndFollowingCARResult(string jobId, Table table)
        {
            var vouchers = table.CreateSet <RecogniseCourtesyAmountResponse>();

            var expectedMessage = new RecogniseBatchCourtesyAmountResponse
            {
                jobIdentifier = jobId,
                voucher       = vouchers.ToArray()
            };

            var task = AutoReadCarBus.GetSingleResponseAsync(10, jobId);

            task.Wait();

            var response = task.Result;

            Assert.IsNotNull(response);
            Assert.AreEqual(expectedMessage.jobIdentifier, response.jobIdentifier);
            Assert.AreEqual(expectedMessage.voucher.Length, response.voucher.Length);

            table.CompareToSet(response.voucher);
        }