public void ExportSingleReportToExcel() { List <TransactionReport> reports = TestDataFactory.GetMonthReports(); List <TransactionReport> single = reports.GetRange(3, 1); ExcelOutput excel = new ExcelOutput(); excel.InsertReportToNewSheet(single, null); }
public void ShowReportOnUI() { List <TransactionReport> reports = TestDataFactory.GetMonthReports(); FormReportMain form = new FormReportMain(EventAggregator.Empty, null); form.ShowReports(reports); form.ShowDialog(); }
public void SaveCategoryCollection() { string testPath = @"..\..\Resources\categories.bgt"; CategoryCollection savedCategories = TestDataFactory.GetCategoryCollectionFromStr(); JsonSerializer <CategoryCollection> serializer = new JsonSerializer <CategoryCollection>(); FileTools.Instance.Save(savedCategories, serializer, testPath); CategoryCollection loadedCategories = FileTools.Instance.Load(serializer, testPath); Assert.AreEqual(savedCategories.Categories.Count, loadedCategories.Categories.Count); }
public void ShowNoCategoryItemsOnUI() { List <TransactionReport> reports = TestDataFactory.GetMonthReports(); foreach (TransactionReport report in reports) { report.Transactions.RemoveWhere(t => t.Category.IsNotNull() && t.SubCategory.IsNotNull()); } FormReportMain form = new FormReportMain(EventAggregator.Empty, null); form.ShowReports(reports); form.ShowDialog(); }
public void GetCategoriesFromString() { var categories = TestDataFactory.GetCategoriesFromStr(); Debug.Assert(categories.Any()); }