public UnitTest() { authsvc = new AuthorizationService.AuthorizationService(); reportsvc = new ReportService.ReportService(); kingdomsvc = new KingdomService.KingdomService(); parksvc = new ParkService.ParkService(); }
[Ignore]//QBO-47289 public void ReportsInventoryTestUsingoAuth() { ReportService.ReportService reportsService = new ReportService.ReportService(qboContextoAuth); reportsService.report_date = "2014-12-31"; Report report = reportsService.ExecuteReport("InventoryValuationSummary"); Assert.IsNotNull(report); Assert.AreEqual("InventoryValuationSummary", report.Header.ReportName); }
public void ReportsCustomerBalanceDetailTestUsingoAuth() { ReportService.ReportService reportsService = new ReportService.ReportService(qboContextoAuth); reportsService.start_date = "2014-01-01"; reportsService.end_date = "2014-12-31"; Report report = reportsService.ExecuteReport("CustomerBalanceDetail"); Assert.IsNotNull(report); Assert.AreEqual("CustomerBalanceDetail", report.Header.ReportName); }
public void ReportsGeneralLedgerDetailTestUsingoAuth() { ReportService.ReportService reportsService = new ReportService.ReportService(qboContextoAuth);; reportsService.start_date = "2014-01-01"; reportsService.end_date = "2014-12-31"; Report report = reportsService.ExecuteReport("GeneralLedger"); Assert.IsNotNull(report); Assert.AreEqual("GeneralLedger", report.Header.ReportName); }
public void ReportsSalesByProductTestUsingoAuth() { ReportService.ReportService reportsService = new ReportService.ReportService(qboContextoAuth); reportsService.start_date = "2013-01-01"; reportsService.end_date = "2014-12-31"; Report report = reportsService.ExecuteReport("ItemSales"); Assert.IsNotNull(report); Assert.AreEqual("ItemSales", report.Header.ReportName); }
public void ReportsARAgingSummaryTestUsingoAuth() { ReportService.ReportService reportsService = new ReportService.ReportService(qboContextoAuth); reportsService.start_date = "2014-01-01"; reportsService.end_date = "2014-12-31"; reportsService.qzurl = "true"; Report report = reportsService.ExecuteReport("AgedReceivables"); Assert.IsNotNull(report); Assert.AreEqual("AgedReceivables", report.Header.ReportName); }
public void ReportsTransactionListTestUsingoAuth() { ReportService.ReportService reportsService = new ReportService.ReportService(qboContextoAuth);; reportsService.start_date = "2014-01-01"; reportsService.end_date = "2014-12-31"; reportsService.qzurl = "true";//not yet supported Report report = reportsService.ExecuteReport("TransactionList"); Assert.IsNotNull(report); Assert.AreEqual("TransactionList", report.Header.ReportName); }
public void ReportsARAgingDetailTestUsingoAuth() { ReportService.ReportService reportsService = new ReportService.ReportService(qboContextoAuth); reportsService.start_date = "2014-01-01"; reportsService.end_date = "2014-12-31"; //reportsService.columns = "tx_date"; Report report = reportsService.ExecuteReport("AgedReceivableDetail"); Assert.IsNotNull(report); Assert.AreEqual("AgedReceivableDetail", report.Header.ReportName); }
public void ReportsTrialBalanceTestUsingoAuth() { ReportService.ReportService reportsService = new ReportService.ReportService(qboContextoAuth); reportsService.start_date = "2014-01-01"; reportsService.end_date = "2014-12-31"; Report report = reportsService.ExecuteReport("TrialBalance"); Assert.IsNotNull(report); Assert.AreEqual("TrialBalance", report.Header.ReportName); Assert.AreEqual(report.Header.StartPeriod, reportsService.start_date); }
public void ReportsCashFlowTestUsingoAuth() { ReportService.ReportService reportsService = new ReportService.ReportService(qboContextoAuth); reportsService.start_date = "2014-01-01"; reportsService.end_date = "2014-12-31"; reportsService.qzurl = "true"; Report report = reportsService.ExecuteReport("CashFlow"); Assert.IsNotNull(report); Assert.AreEqual("CashFlow", report.Header.ReportName); Assert.AreEqual(report.Header.StartPeriod, reportsService.start_date); }
internal static Report GetReportAsync(ServiceContext context, string reportName) { //Initializing the Dataservice object with ServiceContext ReportService.ReportService service = new ReportService.ReportService(context); IdsException exp = null; Boolean reportReturned = false; Report actual = null; // Used to signal the waiting test thread that a async operation have completed. ManualResetEvent manualEvent = new ManualResetEvent(false); // Async callback events are anonomous and are in the same scope as the test code, // and therefore have access to the manualEvent variable. service.OnExecuteReportAsyncCompleted += (sender, e) => { manualEvent.Set(); if (e.Error != null) { exp = e.Error; } if (exp == null) { if (e.Report != null) { reportReturned = true; actual = e.Report; } } }; // Call the service method service.ExecuteReportAsync(reportName); manualEvent.WaitOne(30000, false); Thread.Sleep(10000); if (exp != null) { throw exp; } // Check if we completed the async call, or fail the test if we timed out. if (!reportReturned) { Assert.Fail(String.Format("Retrieving {0} Report Failed", reportName)); } // Set the event to non-signaled before making next async call. manualEvent.Reset(); Assert.IsNotNull(actual); return(actual); }
public void ReportsProfitAndLossTestUsingoAuth() { ReportService.ReportService reportsService = new ReportService.ReportService(qboContextoAuth); reportsService.date_macro = "This Fiscal Year-to-date"; reportsService.accounting_method = "Accrual"; reportsService.qzurl = "true"; reportsService.subcol_py_chg = "true"; Report report = reportsService.ExecuteReport("ProfitAndLoss"); Assert.IsNotNull(report); Assert.AreEqual("ProfitAndLoss", report.Header.ReportName); Assert.AreEqual(report.Header.ReportBasis.ToString(), reportsService.accounting_method); }
public void ReportsBASTestUsingoAuth() { ReportService.ReportService reportsService = new ReportService.ReportService(qboContextoAuth); reportsService.start_date = "2014-01-01"; reportsService.end_date = "2014-12-31"; reportsService.accounting_method = "cashbasis"; Report report = reportsService.ExecuteReport("BAS"); Assert.IsNotNull(report); Assert.AreEqual("BAS", report.Header.ReportName); Assert.AreEqual(report.Header.ReportBasis.ToString(), reportsService.accounting_method); Assert.AreEqual(report.Header.StartPeriod, reportsService.start_date); }
public void ReportsClassSalesTestUsingoAuth() { ReportService.ReportService reportsService = new ReportService.ReportService(qboContextoAuth); reportsService.start_date = "2014-01-01"; reportsService.end_date = "2014-12-31"; reportsService.subcol_py_chg = "true"; reportsService.accounting_method = "Accrual"; Report report = reportsService.ExecuteReport("ClassSales"); Assert.IsNotNull(report); Assert.AreEqual("ClassSales", report.Header.ReportName); Assert.AreEqual(report.Header.ReportBasis.ToString(), reportsService.accounting_method); Assert.AreEqual(report.Header.StartPeriod, reportsService.start_date); }
public void ReportsBalanceSheetTestUsingoAuth() { ReportService.ReportService reportsService = new ReportService.ReportService(qboContextoAuth); reportsService.start_date = "2014-01-01"; reportsService.end_date = "2014-12-31"; reportsService.qzurl = "true"; //should return href tag reportsService.subcol_py_chg = "true"; reportsService.accounting_method = "Accrual"; Report report = reportsService.ExecuteReport("BalanceSheet"); Assert.IsNotNull(report); Assert.AreEqual("BalanceSheet", report.Header.ReportName); Assert.AreEqual(report.Header.ReportBasis.ToString(), reportsService.accounting_method); Assert.AreEqual(report.Header.StartPeriod, reportsService.start_date); }
public void ReportsPrintTestUsingoAuth() { ReportService.ReportService reportsService = new ReportService.ReportService(qboContextoAuth); reportsService.start_date = "2014-01-01"; reportsService.end_date = "2014-12-31"; reportsService.accounting_method = "Accrual"; Report report = reportsService.ExecuteReport("BalanceSheet"); StringBuilder reportText = new StringBuilder(); //Append Report Header printHeader(reportText, report); //Determine Maxmimum Text Lengths to format Report int[] maximumColumnTextSize = getMaximumColumnTextSize(report); //Append Column Headers printColumnData(reportText, report.Columns, maximumColumnTextSize, 0); //Append Rows printRows(reportText, report.Rows, maximumColumnTextSize, 1); //Print Formatted Report to Console Console.Write(reportText.ToString()); }