public async Task ApproveData_Return_Succes()
        {
            //Setup
            FinanceDbContext dbContext = _dbContext(GetCurrentAsyncMethod());

            VBRequestDocumentService   service = new VBRequestDocumentService(dbContext, GetServiceProvider().Object);
            VBRequestDocumentWithPODto data    = GetdataUtil(service).GetTestData_VBRequestDocumentWithPO();

            ApprovalVBFormDto approvalVBFormDto = new ApprovalVBFormDto()
            {
                IsApproved = true,
                Ids        = new List <int>()
                {
                    data.Id
                },
                Bank = new Lib.ViewModels.NewIntegrationViewModel.AccountBankViewModel {
                    Id            = 1,
                    Code          = "BankTest",
                    AccountCOA    = "BankCoaTest",
                    AccountName   = "BankAccountNameTest",
                    AccountNumber = "BankAccountNumberTest",
                    BankCode      = "BankBankCodeTest",
                    BankName      = "BankBankNameTestst",
                    Currency      = new Lib.ViewModels.NewIntegrationViewModel.CurrencyViewModel
                    {
                        Code        = "CurrencyCodeTest",
                        Id          = 1,
                        Description = "CurrencyDescriptionTEst",
                        Rate        = 1,
                        Symbol      = "Sy"
                    }
                }
            };
            //Act
            int result = await service.ApprovalData(approvalVBFormDto);

            //Assert
            Assert.True(0 < result);
        }
Exemple #2
0
        public async Task ApproveData_Return_Succes()
        {
            //Setup
            FinanceDbContext dbContext = _dbContext(GetCurrentAsyncMethod());

            VBRequestDocumentService   service = new VBRequestDocumentService(dbContext, GetServiceProvider().Object);
            VBRequestDocumentWithPODto data    = GetdataUtil(service).GetTestData_VBRequestDocumentWithPO();

            ApprovalVBFormDto approvalVBFormDto = new ApprovalVBFormDto()
            {
                IsApproved = true,
                Ids        = new List <int>()
                {
                    data.Id
                }
            };
            //Act
            int result = await service.ApprovalData(approvalVBFormDto);

            //Assert
            Assert.True(0 < result);
        }