public bool Create(EstimatedPrice obj) { var succes = db.Create(obj); if (succes != -1) { obj.Id = succes; return(estimatedPriceMaterialController.Create(obj)); } return(false); }
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); }