示例#1
0
        public void Update_ValidGroup_ShouldUpdateGroupViaContext()
        {
            var group        = supplierGroupDal.GetOne(supplierGroupId);
            var newName      = group.Name + " - updated";
            var updatedGroup = new SupplierGroup(group.Id, newName);

            supplierGroupDal.Update(updatedGroup);

            context.Verify(c => c.SetModified(It.IsAny <object>()));
            context.Verify(c => c.SaveChanges(), Times.Once);
        }
示例#2
0
        public void UpdateSupplierGroup(int id, string name)
        {
            var supplierGroup = new SupplierGroup(id, name);

            supplierGroupDal.Update(supplierGroup);
        }