public void ReadMessage_With_Invalid_TravelerID()
 {
     IRepository repo = new EFRepository();
     MessageService ms = new MessageService(repo);
     var message = ms.ReadMessage(new Guid("c085ce65-9fd8-e011-813c-206a8a339500"), new Guid("11111111-1111-1111-1111-111111111111"));
     Assert.IsNotNull(message);
 }
 public void ReadMessageTest()
 {
     IRepository repo = new EFRepository();
     MessageService ms = new MessageService(repo);
     var message = ms.ReadMessage(new Guid("c085ce65-9fd8-e011-813c-206a8a339500"), new Guid("37519c07-acd4-e011-ad03-206a8a339500"));
     Assert.IsNotNull(message);
 }
 public void ReadMessage_With_Invalid_MessageID()
 {
     IRepository repo = new EFRepository();
     MessageService ms = new MessageService(repo);
     var message = ms.ReadMessage(new Guid("11111111-1111-1111-1111-111111111111"), new Guid("37519c07-acd4-e011-ad03-206a8a339500"));
     Assert.IsNotNull(message);
 }
 public void ReadMessage_With_Invalid_TravelerID()
 {
     var mockRepo = new Mock<IRepository>();
     Traveler expected = new Traveler { Firstname = "Nimrod" };
     mockRepo.Setup(m => m.FindBy<Traveler>(t => t.TravelerID == It.IsAny<Guid>())).Returns(expected);
     MessageService ms = new MessageService(mockRepo.Object);
     var actual = ms.ReadMessage(new Guid("c085ce65-9fd8-e011-813c-206a8a339500"), It.IsAny<Guid>());
     mockRepo.VerifyAll();
     Assert.AreEqual(expected, actual);
 }
 public ReadMessageResponse ReadMessage(string messageID)
 {
     ReadMessageResponse response = new ReadMessageResponse();
     MessageService msgSvc = new MessageService(_repository);
     try
     {
         TravelerMessage message = msgSvc.ReadMessage(new Guid(messageID), _currentTravelerId);
         response.Message = message.ConvertToMessageView();
         response.MarkSuccess();
     }
     catch (Exception ex)
     {
         ReportError(ex, response);
     }
     return response;
 }