Exemple #1
0
        public void GetList_Unread()
        {
            var another    = sender.SendMessage(receiver, "Unread message", "Unread message body", false);
            var anotherMsg = another.Item1;

            repository.Save(anotherMsg, another.Item2);

            var result = CallGetList(UserInboxType.Nothing, unread: true);

            Assert.AreEqual(1, result.Items.Length, "Number of received messages");
            Assert.AreEqual("Unread message", result.Items.First().Subject, "Received message subject");
        }
Exemple #2
0
        public void GetList_Unread()
        {
            var anotherMsg = CreateEntry.UserMessage(3, sender, receiver, "Unread message", "Unread message body", read: false);

            repository.Save(anotherMsg);

            var result = CallGetList(unread: true);

            Assert.AreEqual(1, result.ReceivedMessages.Length, "Number of received messages");
            Assert.AreEqual("Unread message", result.ReceivedMessages.First().Subject, "Received message subject");
            Assert.AreEqual(0, result.SentMessages.Length, "Number of sent messages");
        }
        public void GetList_Unread()
        {
            var another    = _sender.SendMessage(_receiver, "Unread message", "Unread message body", false);
            var anotherMsg = another.Item1;

            _repository.Save(anotherMsg, another.Item2);

            var result = CallGetList(UserInboxType.Nothing, unread: true);

            result.Items.Length.Should().Be(1, "Number of received messages");
            result.Items.First().Subject.Should().Be("Unread message", "Received message subject");
        }