示例#1
0
        public bool Create(EstimatedPrice obj)
        {
            var succes = db.Create(obj);

            if (succes != -1)
            {
                obj.Id = succes;
                return(estimatedPriceMaterialController.Create(obj));
            }
            return(false);
        }
示例#2
0
        public void CreateTest()
        {
            //Arrange
            DBEstimatedPrice estimatedPrice = new DBEstimatedPrice();
            var create = new EstimatedPrice();

            //create.Id = 666;
            create.estimatedTime = 60;
            create.materials     = null;

            //Act
            var sucess = estimatedPrice.Create(create);

            //Assert
            Assert.AreNotEqual(-1, sucess);
        }