Exemple #1
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 <int>(15, lossesList[0].LossRatioDenominator.Value);
        }
Exemple #2
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);
        }