Blog.Logic.Core.Tests.ChatMessagesLogicTest.ShouldReturnEmptyListWhenGettingChatMessagesByIdIsNull C# (CSharp) Method

ShouldReturnEmptyListWhenGettingChatMessagesByIdIsNull() private method

        public void ShouldReturnEmptyListWhenGettingChatMessagesByIdIsNull()
        {
            _chatMessageRepository = new Mock<IChatMessageRepository>();
            _chatMessageRepository.Setup(a => a.GetChatMessages(It.IsAny<int>(), It.IsAny<int>(), It.IsAny<int>()))
                .Returns(new List<ChatMessage>());

            _userRepository = new Mock<IUserRepository>();

            _chatMessagesLogic = new ChatMessagesLogic(_chatMessageRepository.Object, _userRepository.Object);

            var result = _chatMessagesLogic.GetChatMessagesByUser(1, 2);

            Assert.IsNotNull(result);
            Assert.IsInstanceOf(typeof(List<Common.Contracts.ChatMessage>), result);
            Assert.AreEqual(0, result.Count);
        }