public async Task GetRecipientsAsync_ShouldReturnErrorWhenExceptionInQuery()
        {
            // ARRANGE
            var mockTeachersQuery = new Mock <ITeachersQuery>();

            mockTeachersQuery
            .Setup(t => t.GetAll())
            .ThrowsAsync(new Exception("Mock exception"));

            var mockFileService = new Mock <IFileService <ChatFilesConfiguration> >();

            var mockContextFactory = SetupContextFactory(null, null, mockTeachersQuery.Object);

            _sut = new StudentChatService(mockContextFactory.Object, mockFileService.Object, _mapper);

            // ACT
            var actual = await _sut.GetRecipientsAsync();

            // ASSERT
            Assert.Equal("Mock exception", actual.Error.Message);
        }
        public async Task GetRecipientsAsync_ShouldReturnList()
        {
            // ARRANGE
            var mockTeachersQuery = new Mock <ITeachersQuery>();

            mockTeachersQuery
            .Setup(t => t.GetAll())
            .ReturnsAsync(GetTestTeachers());

            var mockFileService = new Mock <IFileService <ChatFilesConfiguration> >();

            var mockContextFactory = SetupContextFactory(null, null, mockTeachersQuery.Object);

            _sut = new StudentChatService(mockContextFactory.Object, mockFileService.Object, _mapper);

            // ACT
            var actual = await _sut.GetRecipientsAsync();

            // ASSERT
            Assert.Equal(GetTestTeachers().Count, actual.Entity.Count);
            Assert.Equal(ComparableObject.Convert(GetTestTeachers().First()), ComparableObject.Convert(actual.Entity.First()));
        }