public ICommandResult Handle(EnrollmentInputConfirm command) { _EREP.Confirm(command.EnrollmentId); var result = new StandardResult(); result.Notifications.Add("Success", "A Matrícula foi confirmada."); return(result); }
public void ShouldConfirmAEnrollment() { _EREP.Confirm(enrollment.Id); var enrollmentDB = _EREP.GetCurrent(enrollment.Student.Id); Assert.IsNotNull(enrollmentDB); Assert.AreEqual(enrollment.Id, enrollmentDB.Id); Assert.AreEqual(enrollment.Student.Id, enrollmentDB.Student.Id); Assert.AreEqual(enrollment.Begin, enrollmentDB.Begin); Assert.AreEqual(enrollment.End, enrollmentDB.End); Assert.AreEqual(EStatusEnrollment.Confirmed, enrollmentDB.Status); }