Пример #1
0
        public async Task GetAllMessagesShouldReturnAllMessages()
        {
            await this.PopulateMessages();

            var service = new MessengerService(this.conversationRepository, this.messageRepository);

            List <TestMessageViewModel> messages = service
                                                   .GetAllMessages <TestMessageViewModel>()
                                                   .ToList();

            Assert.Equal(2, messages.Count);
            Assert.Equal("bbbb", messages[1].Text);
            Assert.Equal("cccc", messages[0].UserId);
        }