public async Task Should_Success_Put_BankExpenditureNote()
        {
            CreditorAccountService service = new CreditorAccountService(GetServiceProvider().Object, _dbContext(GetCurrentMethod()));
            var data     = _dataUtil(service).GetBankExpenditureNotePostedViewModel();
            var unitData = _dataUtil(service).GetNewData_UnitReceiptNotePostedViewModel();

            data.SupplierCode = unitData.SupplierCode;
            data.SupplierName = unitData.SupplierName;
            data.InvoiceNo    = unitData.InvoiceNo;
            var tempResponse = await service.CreateFromUnitReceiptNoteAsync(unitData);

            var Response = await service.CreateFromBankExpenditureNoteAsync(data);

            var newData = await service.GetByBankExpenditureNote(data.SupplierCode, data.Code, data.InvoiceNo);

            Assert.NotNull(newData);
            newData.Mutation = 10000;
            var updateResponse = await service.UpdateFromBankExpenditureNoteAsync(newData);

            var updateData = await service.GetByBankExpenditureNote(data.SupplierCode, data.Code, data.InvoiceNo);

            Assert.NotNull(updateData);
        }
 public async Task Should_Throw_Exception_Update_From_Bank_Expenditure_Note()
 {
     CreditorAccountService service = new CreditorAccountService(GetServiceProvider().Object, _dbContext(GetCurrentMethod()));
     await Assert.ThrowsAsync <NotFoundException>(() => service.UpdateFromBankExpenditureNoteAsync(new CreditorAccountBankExpenditureNotePostedViewModel()));
 }
 public async Task Should_Fail_Put_BankExpenditureNote()
 {
     CreditorAccountService service = new CreditorAccountService(GetServiceProvider().Object, _dbContext(GetCurrentMethod()));
     CreditorAccountBankExpenditureNotePostedViewModel newData = new CreditorAccountBankExpenditureNotePostedViewModel();
     await Assert.ThrowsAnyAsync <Exception>(() => service.UpdateFromBankExpenditureNoteAsync(newData));
 }