Exemplo n.º 1
0
        public void TestTrendingCalculatorDemandSupplyCriteria_ShouldRunSuccessfully_Suite1()
        {
            var trendingStrategy = new DemandSupplyTrendingCalculator();
            var inputData        = DataPreparator.PrepareDemandData_Suite1();
            var output           = trendingStrategy.CalculateTrending(6, 1, inputData);

            Assert.AreEqual("ABC", output.First().First().item.MovieName);
            Assert.AreEqual("PQR", output.Last().First().item.MovieName);
        }
        public void TrendsCalculatorTest_DemandSupplyCriteria_ShouldRunSuccessfully_Suite1()
        {
            var trendingCalculator = new Library.TrendsCalculator();
            var inputData          = DataPreparator.PrepareDemandData_Suite1();
            var output             = trendingCalculator.FindTrendingData(6, 1, inputData);

            Assert.AreEqual("ABC", output.First().MovieName);
            Assert.AreEqual("XYZ", output.ToList()[1].MovieName);
            Assert.AreEqual("PQR", output.ToList()[2].MovieName);
        }
 public void TrendsCalculatorTest_DemandSupplyCriteria_numberOfSegmentsOfEachUnitToBeZero_ShouldGiveException()
 {
     var trendingCalculator = new Library.TrendsCalculator();
     var inputData          = DataPreparator.PrepareDemandData_Suite1();
     var output             = trendingCalculator.FindTrendingData(6, 0, inputData);
 }
 public void TrendsCalculatorTest_DemandSupplyCriteria_windowPeriodToBeZero_ShouldGiveException()
 {
     var trendingCalculator = new Library.TrendsCalculator();
     var inputData          = DataPreparator.PrepareDemandData_Suite1();
     var output             = trendingCalculator.FindTrendingData(0, 1, inputData);
 }