Пример #1
0
        public void AddConsumptionActualReturnsFalse()
        {
            List <AnnualDetails> testData = null;
            var mock = new Mock <IPlantSetupDal>();

            mock.Setup(x => x.AddConsumptionActual(testData, "2017", 1, "Consumption")).Returns(true);
            var plantManager = new PlantSetUpManager(mock.Object);
            var result       = plantManager.AddConsumptionActual(testData, "2017", 1, "Consumption");

            Assert.IsNotNull(result);
            Assert.IsFalse(result);
        }
Пример #2
0
        public void AddConsumptionActualReturnsTrue()
        {
            var testData = TestData.TestAnnualData();
            var mock     = new Mock <IPlantSetupDal>();

            mock.Setup(x => x.AddConsumptionActual(testData, "2017", 1, "Consumption")).Returns(true);
            var plantManager = new PlantSetUpManager(mock.Object);
            var result       = plantManager.AddConsumptionActual(testData, "2017", 1, "Consumption");

            Assert.IsNotNull(result);
            Assert.IsTrue(result);
        }