Example #1
0
        public void TestReport_Mock_GetStocktaking()
        {
            MockReportRepository      repo           = new MockReportRepository();
            ReportService             _reportService = new ReportService(repo);
            List <StocktakingPackage> spList         = _reportService.GetStocktaking(4);

            foreach (StocktakingPackage p in spList)
            {
                Debug.WriteLine(p.ToString());
            }
            Debug.WriteLine("Number of items: " + spList.Count());
            Assert.IsTrue(spList.Count() > 0);
        }
Example #2
0
        public void TestReport_Mock_GetDistributionCentreLosses()
        {
            IReportRepository reportRepository = new MockReportRepository();
            ReportService     reportService    = new ReportService(reportRepository);
            var lossesList = reportService.GetDistributionCentreLosses();

            foreach (DistributionCentreLosses l in lossesList)
            {
                Debug.WriteLine(l.ToString());
            }
            Debug.WriteLine("Number of items: " + lossesList.Count());
            Assert.AreEqual <int>(1, lossesList.Count());
            Assert.AreEqual <decimal>(15, lossesList[0].LossRatioDenominator);
        }
Example #3
0
        public void TestReport_Mock_GetDistributionCentreStock()
        {
            IReportRepository reportRepository = new MockReportRepository();
            ReportService     reportService    = new ReportService(reportRepository);
            var stockList = reportService.GetDistributionCentreStock();

            foreach (DistributionCentreStock s in stockList)
            {
                Debug.WriteLine(s.ToString());
            }
            Debug.WriteLine("Number of items: " + stockList.Count());
            Assert.AreEqual <int>(1, stockList.Count());
            Assert.AreEqual <decimal>(10, stockList[0].CostPerPackage);
        }