public override void Update() { BugDTO bug = BugService.GetByID(this.BugId); bug.Name = this.EntityName; bug.ProjectID = this.ProjectId; if (IsDescriptionSet) { bug.Description = this.Description; } if (!String.IsNullOrEmpty(this.UserStory) || IsUserStoryIdSet) { bug.UserStoryID = this.UserStoryId; } if (!String.IsNullOrEmpty(this.State)) { bug.EntityStateID = this.StateId; } BugService.Update(bug); foreach (TargetProcessUser user in this.UsersToAssign) { BugService.AssignUser(bug.BugID.Value, user.GetId()); } }
public void BugService_update_simple_bug() { _bugRepository.Setup(x => x.Update(It.IsAny <Data.Entity.Bug>())); _bugService.Update(_bug); _bugRepository.Verify(x => x.Update(It.IsAny <Data.Entity.Bug>()), Times.Once()); }
public ActionResult <Bug> EditBug(Bug bug) { _bugService.Update(bug); return(Ok()); }