public void Exception_GenerateMonthlyBillingFile() { Scheduling tmpSchedule = new Scheduling(); Demographics tmpDemo = new Demographics(); try { b.GenerateMonthlyBillingFile(tmpSchedule, tmpDemo, 2018, 13); } catch (Exception e) { Assert.Fail(e.Message); } }
/** * \brief <b>Brief Description</b> - Execute <b><i>class method</i></b> - Entry point into the generate monthly report menu * \details <b>Details</b> * * This takes in the scheduling, demographics and billing libraries * * \return <b>void</b> */ public void Execute(Scheduling scheduling, Demographics demographics, Billing billing) { // display a clear screen Container.DisplayContent(new List <Pair <string, string> >() { { new Pair <string, string>("", "") } }, 0, -1, MenuCodes.BILLING, "Billing", Description); // get the month to generate the report for DateTime getMonth = DatePicker.GetDate(scheduling, DateTime.Today, false); // check if the user didnt cancel the month selection if (getMonth.Ticks != 0) { // check if the report generation was successful if (billing.GenerateMonthlyBillingFile(scheduling, demographics, getMonth.Year, getMonth.Month)) { Container.DisplayContent(new List <Pair <string, string> >() { { new Pair <string, string>("Report successfuly generated!", "") } }, 0, -1, MenuCodes.BILLING, "Billing", Description); } else { Container.DisplayContent(new List <Pair <string, string> >() { { new Pair <string, string>("Report failed to generate.", "") } }, 0, -1, MenuCodes.BILLING, "Billing", Description); } // wait for confirmation from user that they read the message Console.ReadKey(); } }
private void GenerateMonthlyReport(DateTime dt) { // check if the report generation was successful if (billing.GenerateMonthlyBillingFile(scheduling, demographics, dt.Year, dt.Month)) { snackBar.MessageQueue.Enqueue("SUCCESSFULLY CREATED"); } else { snackBar.MessageQueue.Enqueue("DID NOT GENERATE"); } UpdateReportTree(); }