Example #1
0
        public void DeleteNull()
        {
            Entities.FieldsByUser obj = null;
            adaptadorFieldsByUser.Setup(item => item.SaveChanges()).Returns(null);
            BusinessRules.Interfaces.IFieldsByUser BusinessRulesFieldsByUser = new BusinessRules.BusinessRules.FieldsByUser(adaptadorFieldsByUser.Object);
            var objReturn = BusinessRulesFieldsByUser.Delete(obj);

            Assert.IsTrue(objReturn == null);
        }
Example #2
0
        public void Delete()
        {
            var obj = new Entities.FieldsByUser {
                IdField = 1, IdUser = 2
            };

            adaptadorFieldsByUser.Setup(item => item.SaveChanges()).Returns(1);
            BusinessRules.Interfaces.IFieldsByUser BusinessRulesFieldsByUser = new BusinessRules.BusinessRules.FieldsByUser(adaptadorFieldsByUser.Object);
            var objReturn = BusinessRulesFieldsByUser.Delete(obj);

            Assert.IsTrue(objReturn != null && objReturn.Value);
        }