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); }
public void UpdateSupplierGroup(int id, string name) { var supplierGroup = new SupplierGroup(id, name); supplierGroupDal.Update(supplierGroup); }