public void SetAborted_Test() { // ARRANGE var assignment = CreateTestAssignment(); var assignmentLogic = new AssignmentLogic(); // ACT assignmentLogic.SetAborted(assignment.Id); assignmentLogic.Dispose(); this.uow = new UnitOfWork(); // ASSERT var updatedAssignment = uow.Assignments.Get(assignment.Id); Assert.AreEqual(EnumDefinition.AssignmentStatus.Aborted, updatedAssignment.AssignmentStatus); }
private void btn_SetAborted_Click(object sender, RoutedEventArgs e) { Logger.Log(string.Format("{0}.btn_SetAborted_Click", GetType().FullName)); if (this.SelectedAssignment != null) { try { var assignmentLogic = new AssignmentLogic(); assignmentLogic.SetAborted(this.SelectedAssignment.Id); assignmentLogic.Dispose(); this.Load(); this.RefreshBindings(this.PagingManager.CurrentPage); } catch (CannotChangeStatusException ex) { Logger.LogException(ex); ShowErrorOnStatusChangeDialog(); } } }