コード例 #1
0
            public async Task WhenGetConversationParticipantsGetsCalled()
            {
                Setup();

                AuthService.Setup(service => service.GetUserIdFromToken(It.IsAny <string>())).Returns("not a guid");

                _result = await MessagesController.GetMessagesFromConversation(_conversationId);
            }
コード例 #2
0
            public async Task WhenGetConversationParticipantsGetsCalled()
            {
                Setup();

                AuthService.Setup(service => service.GetUserIdFromToken(It.IsAny <string>())).Returns(_userId.ToString());
                ConversationsService.Setup(service => service.GetConversationParticipants(It.IsAny <Guid>()))
                .ReturnsAsync(new Fixture().CreateMany <Guid>().ToList());

                _result = await MessagesController.GetMessagesFromConversation(_conversationId);
            }