public void DeleteNull() { Entities.StepsNext obj = null; adaptadorStepsNext.Setup(item => item.SaveChanges()).Returns(null); BusinessRules.Interfaces.IStepsNext BusinessRulesStepsNext = new BusinessRules.BusinessRules.StepsNext(adaptadorStepsNext.Object); var objReturn = BusinessRulesStepsNext.Delete(obj); Assert.IsTrue(objReturn == null); }
public void Delete() { var obj = new Entities.StepsNext { IdFlow = 1 }; adaptadorStepsNext.Setup(item => item.SaveChanges()).Returns(1); BusinessRules.Interfaces.IStepsNext BusinessRulesStepsNext = new BusinessRules.BusinessRules.StepsNext(adaptadorStepsNext.Object); var objReturn = BusinessRulesStepsNext.Delete(obj); Assert.IsTrue(objReturn != null && objReturn.Value); }
public void CreateSuccessful() { var obj = new Entities.StepsNext { IdFlow = 200, IdStep = 1, IdStepNext = 2 }; adaptadorStepsNext.Setup(item => item.SaveChanges()).Returns(1); BusinessRules.Interfaces.IStepsNext BusinessRulesStepsNext = new BusinessRules.BusinessRules.StepsNext(adaptadorStepsNext.Object); var objReturn = BusinessRulesStepsNext.Create(obj); Assert.IsTrue(objReturn != null && objReturn.Value > 0); }