示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }