Пример #1
0
        public void ShouldSaveBudget()
        {
            FundBF _Proxy     = new FundBF();
            Budget BudgetInfo = prepareBudgetInfo();
            bool   result     = _Proxy.SaveBudget(BudgetInfo);

            Assert.Equal(true, result);
        }
Пример #2
0
        public void ShouldUpdateBudget()
        {
            int FiscalYearId = 1;

            QilinApplicationContext.Current["_User_Id"] = "sysadmin";
            decimal BudgetAmount = 1000;
            FundBF  _Proxy       = new FundBF();
            Budget  Info         = _Proxy.GetBudgetDetailByFiscalYearID(FiscalYearId);
            int     returnCode   = _Proxy.UpdateBudget(Info, BudgetAmount);

            Assert.Equal(1, returnCode);
        }
Пример #3
0
        public void ShouldSubmitFundTransfer()
        {
            int     FiscalYearId   = 1;
            int     TransferFrom   = 1;
            int     TransferTo     = 2;
            int     CapaxTotal     = 0;
            decimal TransferAmount = 10;

            QilinApplicationContext.Current["_User_Id"] = "sysadmin";
            FundBF _Proxy           = new FundBF();
            var    TransferFromInfo = new BudgeAllocation();
            var    TransferToInfo   = new BudgeAllocation();
            Budget info             = _Proxy.GetBudgetDetailByFiscalYearID(FiscalYearId);

            TransferFromInfo = _Proxy.GetBudgetAllocationdataByBizGroupID(TransferFrom, FiscalYearId);
            TransferToInfo   = _Proxy.GetBudgetAllocationdataByBizGroupID(TransferTo, FiscalYearId);
            int ReturnCode = _Proxy.SubmitFundTransfer(info, TransferFromInfo, TransferToInfo, CapaxTotal, TransferAmount);

            Assert.Equal(1, ReturnCode);
        }