Esempio n. 1
0
        public async Task Should_Failed_VoidTransactionById_InvalidId()
        {
            FpReturnFromBuyerService service     = new FpReturnFromBuyerService(DbContext(GetCurrentMethod()), GetServiceProvider().Object, GetInventoryDocumentService().Object);
            FpReturnFromBuyerService utilService = new FpReturnFromBuyerService(DbContext(GetCurrentMethod()), GetServiceProvider().Object, GetInventoryDocumentService().Object);
            var data = await DataUtil(utilService).GetTestData();

            await Assert.ThrowsAnyAsync <Exception>(() => service.VoidDocumentById(0));
        }
Esempio n. 2
0
        public async Task Should_Success_VoidTransactionById()
        {
            FpReturnFromBuyerService service     = new FpReturnFromBuyerService(DbContext(GetCurrentMethod()), GetServiceProvider().Object, GetInventoryDocumentService().Object);
            FpReturnFromBuyerService utilService = new FpReturnFromBuyerService(DbContext(GetCurrentMethod()), GetServiceProvider().Object, GetInventoryDocumentService().Object);
            var data = await DataUtil(utilService).GetTestData();

            var response = await service.VoidDocumentById(data.Id);

            Assert.NotEqual(0, response);
        }