Ejemplo n.º 1
0
        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());
            }
        }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
 public ActionResult <Bug> EditBug(Bug bug)
 {
     _bugService.Update(bug);
     return(Ok());
 }