public void UpdateAssignment_Test()
        {
            // ARRANGE
            var assignment  = CreateTestAssignment();
            var updateParam = new AssignmentUpdateParam
            {
                Name                   = "TestAssignment Updated",
                DateDue                = DateTime.Now.AddDays(1),
                DatePlanned            = DateTime.Now,
                Description            = "New description Updated",
                DurationPlannedAsTicks = new TimeSpan(1, 0, 0).Ticks,
            };
            var assignmentLogic = new AssignmentLogic();

            // ACT
            assignmentLogic.UpdateAssignment(assignment.Id, updateParam);
            assignmentLogic.Dispose();
            this.uow.Dispose();
            this.uow = new UnitOfWork();

            // ASSERT
            var updatedAssignment = uow.Assignments.Get(assignment.Id);

            Assert.AreNotEqual(assignment.Name, updatedAssignment.Name);
            Assert.AreEqual("TestAssignment Updated", updatedAssignment.Name);
        }
        private void btn_AddAssignment_Click(object sender, RoutedEventArgs e)
        {
            var        assignmentLogic = new AssignmentLogic();
            Assignment assignment      = null;
            var        durationPlanned = ParseDuration();

            if (this.EditMode)
            {
                var param = new AssignmentUpdateParam
                {
                    DateDue                = this.dp_AssignmentDue.SelectedDate,
                    DatePlanned            = this.dp_Planned.SelectedDate,
                    Description            = this.tb_AssignmentDescription.Text,
                    DurationPlannedAsTicks = durationPlanned,
                    Name = this.tb_AssignmentName.Text
                };
                assignmentLogic.UpdateAssignment(this.Assignment.Id, param);
                assignment = assignmentLogic.GetAssignmentById(this.Assignment.Id);
            }
            else
            {
                var param = new AssignmentCreateParam
                {
                    DateDue                = this.dp_AssignmentDue.SelectedDate,
                    DatePlanned            = this.dp_Planned.SelectedDate,
                    Description            = this.tb_AssignmentDescription.Text,
                    DurationPlannedAsTicks = durationPlanned,
                    Name    = this.tb_AssignmentName.Text,
                    Project = this.Project
                };

                assignment = assignmentLogic.AddAssignment(param);
            }

            assignmentLogic.Dispose();
            this.Close();
        }