Exemplo n.º 1
0
        public void ExportSingleReportToExcel()
        {
            List <TransactionReport> reports = TestDataFactory.GetMonthReports();
            List <TransactionReport> single  = reports.GetRange(3, 1);
            ExcelOutput excel = new ExcelOutput();

            excel.InsertReportToNewSheet(single, null);
        }
Exemplo n.º 2
0
        public void ShowReportOnUI()
        {
            List <TransactionReport> reports = TestDataFactory.GetMonthReports();
            FormReportMain           form    = new FormReportMain(EventAggregator.Empty, null);

            form.ShowReports(reports);
            form.ShowDialog();
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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();
        }
Exemplo n.º 5
0
        public void GetCategoriesFromString()
        {
            var categories = TestDataFactory.GetCategoriesFromStr();

            Debug.Assert(categories.Any());
        }