Esempio n. 1
0
        public void CheckThirdParty_WhenExecute_ThenFlagCodelineCorrectionAsCompleted_AndSave()
        {
            queues.Add(GenerateVoucher());

            ExpectContextToCreateTransaction();
            ExpectContextToReturnQueues(queues);
            ExpectContextToReturnVouchers(vouchers);

            var sut = CreatePollingJob();

            sut.Execute(null);

            Assert.IsFalse(queues.Any(q => !q.ResponseCompleted));
            dipsDbContext.Verify(x => x.SaveChanges());
        }
Esempio n. 2
0
        public void GetVouchersInformation_WhenExecute_ThenFlagCodelineCorrectionAsCompleted_AndSave()
        {
            dipsRequests.Add(GenerateDipsRequest());

            ExpectContextToCreateTransaction();
            ExpectContextToReturnQueues(queues);
            ExpectContextToReturnDipsRequests(dipsRequests);

            var sut = CreatePollingJob();

            sut.Execute(null);

            Assert.IsFalse(queues.Any(q => !q.ResponseCompleted));
            dipsDbContext.Verify(x => x.SaveChanges());
        }
        public void WhenExecute_ThenFlagCodelineValidationAsCompleted_AndSave()
        {
            queues.Add(new DipsQueue
            {
                ResponseCompleted = false,
                S_LOCATION        = "CodelineValidationDone",
                S_LOCK            = "0",
                S_SDATE           = "01/01/15",
                S_STIME           = "12:12:12"
            });

            ExpectContextToCreateTransaction();
            ExpectContextToReturnQueues(queues);
            ExpectContextToReturnVouchers(vouchers);

            var sut = CreatePollingJob();

            sut.Execute(null);

            Assert.IsFalse(queues.Any(q => !q.ResponseCompleted));
            dipsDbContext.Verify(x => x.SaveChanges());
        }