public void TestMethod2()
 {
     var mockTraveler = new Mock<Traveler>(MockBehavior.Strict);
     Message expected = new Message { Body = "bbla" };
     //mockTraveler.Setup(a => a.ReadMessage(It.IsAny<Guid>())).Returns(expected);
     //Message actual = mockTraveler.Object.ReadMessage(It.IsAny<Guid>());
     //Assert.AreEqual(expected, actual);
 }
 public static TravelerMessage CreateTravelerMessageFrom(Traveler traveler, Message message)
 {
     TravelerMessage travelerMsg = new TravelerMessage();
     travelerMsg.Message = message;
     travelerMsg.Traveler = traveler;
     travelerMsg.TravelerID = traveler.TravelerID;
     travelerMsg.IsRead = false;
     travelerMsg.FolderID = FolderFactory.CreateFolderFrom(traveler, message);
     return travelerMsg;
 }
Пример #3
0
        public static int CreateFolderFrom(Traveler traveler, Message message)
        {
            if (traveler.TravelerID == message.AuthorID)
            {
                return (int)FolderType.Sent;

            }
            else
            {
                return (int)FolderType.Inbox;
            }
        }