Ejemplo n.º 1
0
        public void TestPartnerByCity()
        {
            string testFile   = "../../js-client/src/forms/Partner/Reports/PartnerReports/PartnerByCity.json";
            string resultFile = "../../csharp/ICT/Testing/lib/MPartner/server/Reporting/TestData/PartnerByCity.Results.html";

            TParameterList SpecificParameters = new TParameterList();

            SpecificParameters.Add("param_only_addresses_valid_on", new TVariant(true));
            SpecificParameters.Add("param_today", new TVariant(new DateTime(2017, 1, 1)));
            SpecificParameters.Add("param_city", new TVariant("Westhausen"));
            SpecificParameters.Add("param_active", new TVariant(true));

            TReportTestingTools.CalculateReport(testFile, resultFile, SpecificParameters);

            TReportTestingTools.TestResult(resultFile);
        }
Ejemplo n.º 2
0
        public void TestPartnerBySpecialTypes()
        {
            string testFile   = "../../../openpetra-client-js/src/forms/Partner/Reports/PartnerReports/PartnerBySpecialType.json";
            string resultFile = "../../csharp/ICT/Testing/lib/MPartner/server/Reporting/TestData/PartnerBySpecialTypes.Results.html";

            TParameterList SpecificParameters = new TParameterList();

            SpecificParameters.Add("param_only_addresses_valid_on", new TVariant(false));
            SpecificParameters.Add("param_today", new TVariant(new DateTime(2017, 1, 1)));
            SpecificParameters.Add("param_explicit_specialtypes", new TVariant("LEDGER"));
            SpecificParameters.Add("param_active", new TVariant(true));

            TReportTestingTools.CalculateReport(testFile, resultFile, SpecificParameters);

            TReportTestingTools.TestResult(resultFile);
        }
Ejemplo n.º 3
0
        public void TestIncExpStatement()
        {
            string         testFile           = "../../csharp/ICT/Testing/lib/MFinance/server/Reporting/TestData/IncExpStmt.Test.json";
            string         resultFile         = "../../csharp/ICT/Testing/lib/MFinance/server/Reporting/TestData/IncExpStmt.Results.csv";
            int            LedgerNumber       = 43;
            TParameterList SpecificParameters = new TParameterList();

            SpecificParameters.Add("param_start_period_i", 1);
            SpecificParameters.Add("param_end_period_i", 1);
            SpecificParameters.Add("param_costcentreoptions", "SelectedCostCentres");
            string StandardCostCentre = TGLTransactionWebConnector.GetStandardCostCentre(LedgerNumber);

            SpecificParameters.Add("param_cost_centre_codes", StandardCostCentre);
            TReportTestingTools.CalculateReport(testFile, resultFile, SpecificParameters, LedgerNumber);

            TReportTestingTools.TestResult(resultFile, LedgerNumber);
        }
Ejemplo n.º 4
0
        public void TestAccountDetail()
        {
            string         testFile           = "../../csharp/ICT/Testing/lib/MFinance/server/Reporting/TestData/AccountDetail.Test.xml";
            int            LedgerNumber       = 43;
            TParameterList SpecificParameters = new TParameterList();

            SpecificParameters.Add("param_start_period_i", 1);
            SpecificParameters.Add("param_end_period_i", 1);

            // make sure that the parameters are explicitly strings
            SpecificParameters.Add("param_account_code_start", new TVariant("0100", true));
            SpecificParameters.Add("param_account_code_end", new TVariant("0100", true));
            SpecificParameters.Add("param_cost_centre_code_start", new TVariant("10100", true));
            SpecificParameters.Add("param_cost_centre_code_end", new TVariant("10500", true));

            TReportTestingTools.CalculateReport(testFile, SpecificParameters, LedgerNumber);

            TReportTestingTools.TestResult(testFile, LedgerNumber);
        }
Ejemplo n.º 5
0
        public void TestPartnerBySubscription()
        {
            // Prepare test cases
            // 43012100 and 43013911 should have subscriptions for NEWSUPDATES
            // only 43012100 has consent for Newsletter
            AddSubscription(43012100, "NEWSUPDATES", "NEWSLETTER");
            AddSubscription(43013911, "NEWSUPDATES", "PR");

            string testFile   = "../../js-client/src/forms/Partner/Reports/PartnerReports/PartnerBySubscription.json";
            string resultFile = "../../csharp/ICT/Testing/lib/MPartner/server/Reporting/TestData/PartnerBySubscription.Results.html";

            TParameterList SpecificParameters = new TParameterList();

            SpecificParameters.Add("PublicationCode", new TVariant("NEWSUPDATES"));
            SpecificParameters.Add("param_consent", new TVariant("NEWSLETTER"));

            TReportTestingTools.CalculateReport(testFile, resultFile, SpecificParameters);

            TReportTestingTools.TestResult(resultFile);
        }
Ejemplo n.º 6
0
        public void TestPartnerByCity()
        {
            string testFile   = "../../js-client/src/forms/Partner/Reports/PartnerReports/PartnerByCity.json";
            string resultFile = "../../csharp/ICT/Testing/lib/MPartner/server/Reporting/TestData/PartnerByCity.Results.html";

            // Prepare test cases
            // 43013259 should have consent for using the address for Newsletter
            AddAddressPermission(43013259, "NEWSLETTER");

            TParameterList SpecificParameters = new TParameterList();

            SpecificParameters.Add("param_only_addresses_valid_on", new TVariant(true));
            SpecificParameters.Add("param_today", new TVariant(new DateTime(2017, 1, 1)));
            SpecificParameters.Add("param_city", new TVariant("Westhausen"));
            SpecificParameters.Add("param_active", new TVariant(true));

            TReportTestingTools.CalculateReport(testFile, resultFile, SpecificParameters);

            TReportTestingTools.TestResult(resultFile);
        }
Ejemplo n.º 7
0
        public void TestTrialBalance()
        {
            string         testFile           = "../../js-client/src/forms/Finance/GeneralLedger/Reports/TrialBalance.json";
            string         resultFile         = "../../csharp/ICT/Testing/lib/MFinance/server/Reporting/TestData/TrialBalance.Results.html";
            int            LedgerNumber       = 43;
            TParameterList SpecificParameters = new TParameterList();

            SpecificParameters.Add("param_start_period_i", 1);
            SpecificParameters.Add("param_end_period_i", 1);

            // make sure that the parameters are explicitly strings
            SpecificParameters.Add("param_account_code_start", new TVariant("0100", true));
            SpecificParameters.Add("param_account_code_end", new TVariant("0100", true));
            SpecificParameters.Add("param_cost_centre_code_start", new TVariant("10100", true));
            SpecificParameters.Add("param_cost_centre_code_end", new TVariant("10500", true));

            TReportTestingTools.CalculateReport(testFile, resultFile, SpecificParameters, LedgerNumber);

            TReportTestingTools.TestResult(resultFile, LedgerNumber);
        }
Ejemplo n.º 8
0
        public void TestAccountDetailSelectedAccount()
        {
            string         testFile           = "../../../openpetra-client-js/src/forms/Finance/GeneralLedger/Reports/AccountDetail.json";
            string         resultFile         = "../../csharp/ICT/Testing/lib/MFinance/server/Reporting/TestData/AccountDetailSelectedAccount.Results.html";
            int            LedgerNumber       = 43;
            TParameterList SpecificParameters = new TParameterList();

            SpecificParameters.Add("param_year_i", 0);
            SpecificParameters.Add("param_start_period_i", 1);
            SpecificParameters.Add("param_end_period_i", 1);

            // make sure that the parameters are explicitly strings
            SpecificParameters.Add("param_rgrAccounts", "AccountList");
            SpecificParameters.Add("param_account_codes", new TVariant("0100", true));
            SpecificParameters.Add("param_account_code_start", "*NOTUSED*");
            SpecificParameters.Add("param_account_code_end", "*NOTUSED*");
            SpecificParameters.Add("param_cost_centre_code_start", new TVariant("10100", true));
            SpecificParameters.Add("param_cost_centre_code_end", new TVariant("10500", true));

            TReportTestingTools.CalculateReport(testFile, resultFile, SpecificParameters, LedgerNumber);

            TReportTestingTools.TestResult(resultFile, LedgerNumber);
        }