Example #1
0
        public void ShouldUpdateProfessorWithSuccess()
        {
            StandardResult result      = (StandardResult)handler.Handle(commandUpdate);
            var            professorDB = _PREP.Get(professor.Id);

            Assert.IsTrue(result.IsValid);
            Assert.IsTrue(result.Notifications.Any(x => x.Key == "Success"));
            Assert.AreEqual(commandUpdate.ProfessorId, professorDB.Id);
            Assert.AreEqual(commandUpdate.FirstName, professorDB.FirstName);
            Assert.AreEqual(commandUpdate.LastName, professorDB.LastName);
            Assert.AreEqual(commandUpdate.Email, professorDB.Email.Address);
            Assert.AreEqual(commandUpdate.Phone, professorDB.Phone);
            Assert.AreEqual(commandUpdate.Degree, professorDB.Degree);
        }