Ejemplo n.º 1
0
        public void AddSolidwasteDailyReturnsFalse()
        {
            List <ProductionDaily> testData = null;
            var mock = new Mock <IPlantSetupDal>();

            mock.Setup(x => x.AddSolidwasteDaily(testData, 122.345, "2017-01-12")).Returns(true);
            var plantManager = new PlantSetUpManager(mock.Object);
            var result       = plantManager.AddSolidwasteDaily(testData, 122.345, "2017-01-12");

            Assert.IsNotNull(result);
            Assert.IsFalse(result);
        }
Ejemplo n.º 2
0
        public void AddSolidwasteDailyReturnsTrue()
        {
            var testData = new List <ProductionDaily> {
                new ProductionDaily {
                    AssetId = 1, DepartName = "Tests", Total = 233.34, UOM = "kwh", UOMId = 1
                },
                new ProductionDaily {
                    AssetId = 1, DepartName = "Tests", Total = 233.34, UOM = "kwh", UOMId = 1
                }
            };
            var mock = new Mock <IPlantSetupDal>();

            mock.Setup(x => x.AddSolidwasteDaily(testData, 122.345, "2017-01-12")).Returns(true);
            var plantManager = new PlantSetUpManager(mock.Object);
            var result       = plantManager.AddSolidwasteDaily(testData, 122.345, "2017-01-12");

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